9.2
general documentation
cs_solidification.h
Go to the documentation of this file.
1#ifndef CS_SOLIDIFICATION_H
2#define CS_SOLIDIFICATION_H
3
4/*============================================================================
5 * Header to handle the solidification module with CDO schemes
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2026 EDF S.A.
12
13 This program is free software; you can redistribute it and/or modify it under
14 the terms of the GNU General Public License as published by the Free Software
15 Foundation; either version 2 of the License, or (at your option) any later
16 version.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25 Street, Fifth Floor, Boston, MA 02110-1301, USA.
26*/
27
28/*----------------------------------------------------------------------------
29 * Local headers
30 *----------------------------------------------------------------------------*/
31
32#include "base/cs_base.h"
33#include "base/cs_boundary.h"
34#include "base/cs_time_plot.h"
35#include "base/cs_time_step.h"
36#include "cdo/cs_equation.h"
37#include "cdo/cs_iter_algo.h"
38#include "cdo/cs_navsto_param.h"
39
40/*============================================================================
41 * Macro definitions
42 *============================================================================*/
43
90#define CS_SOLIDIFICATION_POST_CELL_STATE (1 << 0) /* = 1 */
91#define CS_SOLIDIFICATION_POST_ENTHALPY (1 << 1) /* = 2 */
92#define CS_SOLIDIFICATION_POST_CBULK_ADIM (1 << 2) /* = 4 */
93#define CS_SOLIDIFICATION_POST_CLIQ (1 << 3) /* = 8 */
94#define CS_SOLIDIFICATION_POST_LIQUIDUS_TEMPERATURE (1 << 4) /* = 16 */
95#define CS_SOLIDIFICATION_POST_SEGREGATION_INDEX (1 << 5) /* = 32 */
96#define CS_SOLIDIFICATION_POST_SOLIDIFICATION_RATE (1 << 6) /* = 64 */
97#define CS_SOLIDIFICATION_POST_ADVANCED_ANALYSIS (1 << 7) /* = 128 */
98
142#define CS_SOLIDIFICATION_USE_ENTHALPY_VARIABLE (1 << 0) /*= 1 */
143#define CS_SOLIDIFICATION_NO_VELOCITY_FIELD (1 << 1) /*= 2 */
144#define CS_SOLIDIFICATION_SKIP_RHO_CHECK (1 << 2) /*= 4 */
145#define CS_SOLIDIFICATION_WITH_SOLUTE_SOURCE_TERM (1 << 3) /*= 8 */
146#define CS_SOLIDIFICATION_USE_EXTRAPOLATION (1 << 4) /*= 16 */
147#define CS_SOLIDIFICATION_WITH_PENALIZED_EUTECTIC (1 << 5) /*= 32 */
148
149/*
150 *
151 * \def CS_SOLIDIFICATION_BINARY_ALLOY_M_FUNC
152 * \brief the update of the forcing term (penalization) in the momentum equation
153 * is defined using a user function
154 *
155 * \def CS_SOLIDIFICATION_BINARY_ALLOY_C_FUNC
156 * \brief the update of the liquid concentration of the binary alloy is defined
157 * using a user function
158 *
159 * \def CS_SOLIDIFICATION_BINARY_ALLOY_G_FUNC
160 * \brief the update of the liquid fraction is defined using a user function
161 *
162 * \def CS_SOLIDIFICATION_BINARY_ALLOY_T_FUNC
163 * \brief the update of the thermal source term is defined using a user function
164 */
165
166#define CS_SOLIDIFICATION_BINARY_ALLOY_M_FUNC (1 << 7) /*= 128 */
167#define CS_SOLIDIFICATION_BINARY_ALLOY_C_FUNC (1 << 8) /*= 256 */
168#define CS_SOLIDIFICATION_BINARY_ALLOY_G_FUNC (1 << 9) /*= 512 */
169#define CS_SOLIDIFICATION_BINARY_ALLOY_T_FUNC (1 <<10) /*= 1024 */
170
175/*=============================================================================
176 * Structure and type definitions
177 *============================================================================*/
178
206typedef enum {
207
212
214
216
236typedef enum {
237
242
244
246
254typedef enum {
255
259
261
263
264/*----------------------------------------------------------------------------*/
275/*----------------------------------------------------------------------------*/
276
277typedef void
279 const cs_cdo_connect_t *connect,
280 const cs_cdo_quantities_t *quant,
281 const cs_time_step_t *ts);
282
283/* Structure storing physical parameters related to a choice of solidification
284 modelling */
285
286/*----------------------------------------------------------------------------
287 * Stefan model
288 *----------------------------------------------------------------------------
289 *
290 * Neither advection nor segregation is taken into account.
291 * The liquid fraction is a step function w.r.t. the temperature.
292 */
293
294typedef struct {
295
296 /* Physical parameters to specify the law of variation of the liquid fraction
297 * with respect to the temperature
298 *
299 * gl(T) = 1 if T > T_change
300 * Otherwise:
301 * gl(T) = 0
302 */
303
305
306 /* Function pointers */
307 /* ----------------- */
308
309 /* Function to update the liquid fraction */
310
312
313 /* Function to update the source term for the thermal equation */
314
316
317 /* Numerical parameters */
318 /* -------------------- */
319
322
324
325
326/* Voller and Prakash model "A fixed grid numerical modelling methodology for
327 * convection-diffusion mushy region phase-change problems" Int. J. Heat
328 * Transfer, 30 (8), 1987.
329 * No tracer. Only physical constants describing the solidification process are
330 * used.
331 */
332
333/*----------------------------------------------------------------------------
334 * Solidification without segregation (Voller & Prakash'87 model)
335 *----------------------------------------------------------------------------*/
336
337typedef struct {
338
339 /* Physical parameters to specify the law of variation of the liquid fraction
340 * with respect to the temperature
341 *
342 * gl(T) = 1 if T > t_liquidus and gl(T) = 0 if T < t_solidus
343 * Otherwise:
344 * gl(T) = (T - t_solidus)/(t_liquidus - t_solidus)
345 */
346
349
350 /* Function pointers */
351 /* ----------------- */
352
353 /* Function to update the liquid fraction */
354
356
357 /* Function to update the source term for the thermal equation */
358
360
361 /* Numerical parameters */
362 /* -------------------- */
363
366
368
369
370/*----------------------------------------------------------------------------
371 * Solidification of a binary alloy with segregation (Voller & Prakash'89 model)
372 *----------------------------------------------------------------------------*/
373
374typedef struct {
375
376 /* Alloy features */
377 /* -------------- */
378
379 /* Reference mixture concentration (used in the Boussinesq approximation and
380 * for normalization */
381
383
384 /* Phase diagram features for an alloy with the component A and B */
385 /* -------------------------------------------------------------- */
386
387 /* Physical parameters */
388
389 cs_real_t kp; /* distribution coefficient */
390 cs_real_t inv_kp; /* reciprocal of kp */
391 cs_real_t inv_kpm1; /* 1/(kp - 1) */
392 cs_real_t ml; /* Liquidus slope \frac{\partial g_l}{\partial C} */
393 cs_real_t inv_ml; /* reciprocal of ml */
394
395 /* Temperature of phase change for the pure material (conc = 0) */
396
398
399 /* Eutectic point: temperature and concentration */
400
404
408
409 /* The variable related to this equation in the solute concentration of
410 * the mixture: c_bulk (c_s in the solid phase and c_l in the liquid phase)
411 * c_bulk = gs*c_s + gl*c_l where gs + gl = 1
412 * gl is the liquid fraction and gs the solid fraction
413 * c_s = kp * c_l (lever rule is assumed up to now)
414 *
415 * --> c_bulk = (gs*kp + gl)*c_l
416 */
417
418 /* Function to update the liquid fraction */
419
421
422 /* Function to update the source term for the thermal equation */
423
425
426 /* Function to update the velocity forcing in the momentum equation */
427
429
430 /* Function to update c_l in each cell */
431
433
434 /* Drive the convergence of the coupled system (solute transport and thermal
435 * equation) with respect to the following criteria (taken from Voller and
436 * Swaminathan'91)
437 * max_{c\in C} |Temp^(k+1) - Temp^(k)| < delta_tolerance
438 * max_{c\in C} |Cbulk^(k+1) - Cbulk*^(k)| < delta_tolerance
439 * n_iter < n_iter_max
440 *
441 * eta_relax: add a relaxation in the update of the eta coefficient
442 * conc_liq = eta_coef * conc_bulk
443 * eta_relax = 0. --> No relaxation (default choice)
444 *
445 * gliq_relax: idem but for the liquid fraction
446 */
447
448 int iter;
451 double eta_relax;
453
454 /* During the non-linear iteration process one needs:
455 * temp_{n} --> stored in field->val_pre
456 * temp_{n+1}^k --> stored in tk_bulk (in this structure)
457 * temp_{n+1}^{k+1} --> stored in field->val
458 *
459 * Optionally one may consider an extrapolated temperature and bulk
460 * concentration
461 * temp_{n+1}^{extrap} = 2*temp_{n} - temp_{n-1}
462 *
463 * Same thing for the bulk concentration.
464 */
465
470
471 /* Solute concentration in the liquid phase
472 * 1) array of the last computed values at cells
473 * 2) array of the last computed values at faces (interior and border) */
474
477
478 /* Temperature values at faces (this is not owned by the structure) */
479
481
482 /* Equation for the solute transport and related quantities */
483
486
487 /* Diffusion coefficient for the solute in the liquid phase
488 * diff_pty_val = rho * g_l * diff_coef */
489
493
496
497 /* Optional post-processing arrays */
498 /* ------------------------------ */
499
500 /* Liquidus temperature (values at cell centers) */
501
503
504 /* Quantities for advanced analysis */
505
508
510
511/*----------------------------------------------------------------------------
512 * Main structure to manage the solidification process
513 *----------------------------------------------------------------------------*/
514
515typedef struct {
516
517 cs_flag_t model; /* Modelling for the solidification module */
518 cs_flag_t options; /* Flag dedicated to general options to handle
519 * the solidification module*/
520 cs_flag_t post_flag; /* Flag dedicated to the post-processing
521 * of the solidification module */
522 int verbosity; /* Level of verbosity */
523
524 /* Physical properties common to all models */
525 /* ---------------------------------------- */
526
527 /* Mass density of the liquid/solid media */
528
530
531 /* Reference value for the heat capacity in the solidification/melting area
532 * (assumed to be uniform) */
533
535
536 /* Viscosity (pointer to the total viscosity which should be equal to the
537 * laminar viscosity since no turbulence modelling is usually taken into
538 * account */
539
541
542 /* Physical parameter for computing the source term in the energy equation
543 * Latent heat between the liquid and solid phase
544 */
545
547
548
549 /* Liquid fraction of the mixture */
550 /* ------------------------------ */
551
552 cs_field_t *g_l_field; /* field storing the values of the liquid
553 fraction at each cell */
554 cs_property_t *g_l; /* liquid fraction property */
555
556 /* array storing the state (solid, mushy, liquid) for each cell */
557
559
560 /* Plot evolution of the solidification process */
561
563
564 /* Monitoring related to this module */
565
568
569 /* Quantities related to the energy equation */
570 /* ----------------------------------------- */
571
573
574 /* Fields associated to this module */
575
577
578 /* Enthalpy (by default this a derived field which can be used to update of
579 the liquid fraction) */
580
582
583
584 /* A reaction term and source term are introduced in the thermal model */
585
589
590 /* Additional settings related to the choice of solidification modelling */
591
593
594 /* Strategy to update quantities during the solidification process. These
595 * quantities are the liquid fraction, the thermal source term for
596 * instance */
597
599
600 /* A reaction term is introduced in the momentum equation. This terms tends to
601 * a huge number when the liquid fraction tends to 0 in order to penalize
602 * the velocity to zero when the whole cell is solid
603 */
604
605 cs_real_t *forcing_mom_array; /* values of the forcing reaction
606 coefficient in each cell */
608
609 /* Porous media model acting as a reaction term in the momentum equation:
610 *
611 * forcing_coef = visco0 / KC
612 * where visco0 is the laminar viscosity and K the permeability
613 *
614 * The Kozeny-Carman relation gives a value of the permeability coefficient
615 *
616 * KC = gl^3 * s_das^2 / (PI^2 * Kozeny_const * tau^2 * (1 - gl)^2)
617 *
618 * where
619 * - gl is the liquid fraction
620 * - s_das is the secondary dendrite arm spacing [m]
621 * - Kozeny_const is the Kozeny constant
622 * - tau is the tortuosity coefficient
623 *
624 * One gathers all parameters which are constant during the simulation
625 * in the parameter "forcing_coef"
626 *
627 * F(u) = forcing_coef * (1- gl)^2/(gl^3 + forcing_eps) * u
628 *
629 * There is slight modification in order to avoid a division by zero.
630 */
631
632 double s_das; /* default is 0.00085 m */
633 double kozeny_constant; /* default value is 5.0 */
634 double tortuosity; /* default value is 2.0 */
636
637 /* First cell associated to a fluid/solid area (i.e. not associated to
638 * a permanent solid zone) */
639
641
643
644/*============================================================================
645 * Public function prototypes
646 *============================================================================*/
647
648/*----------------------------------------------------------------------------*/
652/*----------------------------------------------------------------------------*/
653
654bool
656
657/*----------------------------------------------------------------------------*/
663/*----------------------------------------------------------------------------*/
664
667
668/*----------------------------------------------------------------------------*/
674/*----------------------------------------------------------------------------*/
675
676void
678
679/*----------------------------------------------------------------------------*/
687/*----------------------------------------------------------------------------*/
688
689void
691
692/*----------------------------------------------------------------------------*/
707/*----------------------------------------------------------------------------*/
708
711 cs_flag_t options,
712 cs_flag_t post_flag,
713 const cs_boundary_t *boundaries,
715 cs_navsto_param_model_flag_t ns_model_flag,
716 cs_navsto_param_coupling_t algo_coupling,
717 cs_navsto_param_post_flag_t ns_post_flag);
718
719/*----------------------------------------------------------------------------*/
729/*----------------------------------------------------------------------------*/
730
731void
733 double tortuosity,
734 double s_das);
735
736/*----------------------------------------------------------------------------*/
742/*----------------------------------------------------------------------------*/
743
746
747/*----------------------------------------------------------------------------*/
753/*----------------------------------------------------------------------------*/
754
757
758/*----------------------------------------------------------------------------*/
765/*----------------------------------------------------------------------------*/
766
767void
769 cs_real_t latent_heat);
770
771/*----------------------------------------------------------------------------*/
777/*----------------------------------------------------------------------------*/
778
781
782/*----------------------------------------------------------------------------*/
788/*----------------------------------------------------------------------------*/
789
792
793/*----------------------------------------------------------------------------*/
804/*----------------------------------------------------------------------------*/
805
806void
808 cs_real_t t_ref,
809 cs_real_t t_solidus,
810 cs_real_t t_liquidus,
811 cs_real_t latent_heat);
812
813/*----------------------------------------------------------------------------*/
822/*----------------------------------------------------------------------------*/
823
824void
826 cs_real_t t_liquidus,
827 cs_real_t latent_heat);
828
829/*----------------------------------------------------------------------------*/
835/*----------------------------------------------------------------------------*/
836
839
840/*----------------------------------------------------------------------------*/
847/*----------------------------------------------------------------------------*/
848
851
852/*----------------------------------------------------------------------------*/
873/*----------------------------------------------------------------------------*/
874
875void
877 const char *varname,
878 cs_real_t beta_t,
879 cs_real_t temp0,
880 cs_real_t beta_c,
881 cs_real_t conc0,
882 cs_real_t kp,
883 cs_real_t mliq,
884 cs_real_t t_eutec,
885 cs_real_t t_melt,
886 cs_real_t solute_diff,
887 cs_real_t latent_heat);
888
889/*----------------------------------------------------------------------------*/
896/*----------------------------------------------------------------------------*/
897
898void
900
901/*----------------------------------------------------------------------------*/
918/*----------------------------------------------------------------------------*/
919
920void
922 cs_solidification_func_t *cliq_update,
923 cs_solidification_func_t *gliq_update,
924 cs_solidification_func_t *thm_st_update);
925
926/*----------------------------------------------------------------------------*/
932/*----------------------------------------------------------------------------*/
933
936
937/*----------------------------------------------------------------------------*/
941/*----------------------------------------------------------------------------*/
942
943void
945
946/*----------------------------------------------------------------------------*/
954/*----------------------------------------------------------------------------*/
955
956void
958 const cs_cdo_quantities_t *quant);
959
960/*----------------------------------------------------------------------------*/
965/*----------------------------------------------------------------------------*/
966
967void
969
970/*----------------------------------------------------------------------------*/
980/*----------------------------------------------------------------------------*/
981
982void
984 const cs_cdo_connect_t *connect,
985 const cs_cdo_quantities_t *quant,
986 const cs_time_step_t *time_step);
987
988/*----------------------------------------------------------------------------*/
998/*----------------------------------------------------------------------------*/
999
1000void
1002 const cs_cdo_connect_t *connect,
1003 const cs_cdo_quantities_t *quant,
1004 const cs_time_step_t *time_step,
1005 bool &is_last_iter);
1006
1007/*----------------------------------------------------------------------------*/
1015/*----------------------------------------------------------------------------*/
1016
1017void
1019 const cs_cdo_quantities_t *quant,
1020 const cs_time_step_t *ts);
1021
1022/*----------------------------------------------------------------------------*/
1044/*----------------------------------------------------------------------------*/
1045
1046void
1048 int mesh_id,
1049 int cat_id,
1050 int ent_flag[5],
1051 cs_lnum_t n_cells,
1052 cs_lnum_t n_i_faces,
1053 cs_lnum_t n_b_faces,
1054 const cs_lnum_t cell_ids[],
1055 const cs_lnum_t i_face_ids[],
1056 const cs_lnum_t b_face_ids[],
1057 const cs_time_step_t *time_step);
1058
1059#endif /* CS_SOLIDIFICATION_H */
Field descriptor.
Definition: cs_field.h:275
time step descriptor
Definition: cs_time_step.h:60
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
unsigned cs_gnum_t
global mesh entity number
Definition: cs_defs.h:317
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
unsigned short int cs_flag_t
Definition: cs_defs.h:334
cs_flag_t cs_navsto_param_post_flag_t
Definition: cs_navsto_param.h:56
cs_navsto_param_coupling_t
Choice of algorithm for solving the system.
Definition: cs_navsto_param.h:237
cs_navsto_param_model_t
Describe the system of equations related to the Navier-Stokes to be solved.
Definition: cs_navsto_param.h:80
cs_flag_t cs_navsto_param_model_flag_t
Definition: cs_navsto_param.h:55
cs_param_nl_algo_t
Class of non-linear iterative algorithm.
Definition: cs_param_types.h:715
cs_solidification_binary_alloy_t * cs_solidification_get_binary_alloy_struct(void)
Get the structure defining the binary alloy model.
Definition: cs_solidification.cpp:3841
cs_solidification_voller_t * cs_solidification_check_voller_model(void)
Sanity checks on the consistency of the Voller's model settings.
Definition: cs_solidification.cpp:3737
void cs_solidification_set_strategy(cs_solidification_strategy_t strategy)
Set the strategy to update quantitiess (liquid fraction and the thermal source term for the two main ...
Definition: cs_solidification.cpp:4059
cs_solidification_binary_alloy_t * cs_solidification_check_binary_alloy_model(void)
Sanity checks on the consistency of the settings of the binary alloy model.
Definition: cs_solidification.cpp:3871
void() cs_solidification_func_t(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts)
Function pointer associated to a solidification model aiming at updating/initializing the solidificat...
Definition: cs_solidification.h:278
void cs_solidification_extra_op(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts)
Predefined extra-operations for the solidification module.
Definition: cs_solidification.cpp:5162
void cs_solidification_init_values(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step)
Set an initial values for all quantities related to this module This is done after the setup step.
Definition: cs_solidification.cpp:4886
cs_solidification_stefan_t * cs_solidification_check_stefan_model(void)
Sanity checks on the consistency of the Stefan's model settings.
Definition: cs_solidification.cpp:3660
cs_solidification_t * cs_solidification_get_structure(void)
Retrieve the main structure to deal with solidification process.
Definition: cs_solidification.cpp:3211
cs_solidification_model_t
Type of physical model used to simulate the solidifcation/fusion process.
Definition: cs_solidification.h:206
@ CS_SOLIDIFICATION_MODEL_BINARY_ALLOY
Definition: cs_solidification.h:211
@ CS_SOLIDIFICATION_MODEL_VOLLER_NL
Definition: cs_solidification.h:210
@ CS_SOLIDIFICATION_MODEL_VOLLER_PRAKASH_87
Definition: cs_solidification.h:209
@ CS_SOLIDIFICATION_N_MODELS
Definition: cs_solidification.h:213
@ CS_SOLIDIFICATION_MODEL_STEFAN
Definition: cs_solidification.h:208
void cs_solidification_init_setup(void)
Setup equations/properties related to the solidification module.
Definition: cs_solidification.cpp:4314
cs_solidification_t * cs_solidification_destroy_all(void)
Free the main structure related to the solidification module.
Definition: cs_solidification.cpp:4219
cs_solidification_strategy_t
Kind of strategy to use to model the segregation/solidification process. This implies a setting of fu...
Definition: cs_solidification.h:254
@ CS_SOLIDIFICATION_STRATEGY_LEGACY
Definition: cs_solidification.h:256
@ CS_SOLIDIFICATION_STRATEGY_TAYLOR
Definition: cs_solidification.h:257
@ CS_SOLIDIFICATION_STRATEGY_PATH
Definition: cs_solidification.h:258
@ CS_SOLIDIFICATION_N_STRATEGIES
Definition: cs_solidification.h:260
void cs_solidification_compute(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, bool &is_last_iter)
Solve equations related to the solidification module.
Definition: cs_solidification.cpp:5102
void cs_solidification_set_binary_alloy_model(const char *name, const char *varname, cs_real_t beta_t, cs_real_t temp0, cs_real_t beta_c, cs_real_t conc0, cs_real_t kp, cs_real_t mliq, cs_real_t t_eutec, cs_real_t t_melt, cs_real_t solute_diff, cs_real_t latent_heat)
Set the main physical parameters which describe a solidification process with a binary alloy (with co...
Definition: cs_solidification.cpp:3930
void cs_solidification_finalize_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
Finalize the setup stage for equations related to the solidification module.
Definition: cs_solidification.cpp:4475
void cs_solidification_set_verbosity(int verbosity)
Set the level of verbosity for the solidification module.
Definition: cs_solidification.cpp:3225
cs_solidification_t * cs_solidification_activate(cs_solidification_model_t model, cs_flag_t options, cs_flag_t post_flag, const cs_boundary_t *boundaries, cs_navsto_param_model_t ns_model, cs_navsto_param_model_flag_t ns_model_flag, cs_navsto_param_coupling_t algo_coupling, cs_navsto_param_post_flag_t ns_post_flag)
Activate the solidification module.
Definition: cs_solidification.cpp:3269
void cs_solidification_extra_post(void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *time_step)
Predefined post-processing output for the solidification module. Prototype of this function is fixed ...
Definition: cs_solidification.cpp:5339
cs_solidification_state_t
Kind of state in which a cell or an entity is.
Definition: cs_solidification.h:236
@ CS_SOLIDIFICATION_STATE_SOLID
Definition: cs_solidification.h:238
@ CS_SOLIDIFICATION_N_STATES
Definition: cs_solidification.h:243
@ CS_SOLIDIFICATION_STATE_LIQUID
Definition: cs_solidification.h:240
@ CS_SOLIDIFICATION_STATE_MUSHY
Definition: cs_solidification.h:239
@ CS_SOLIDIFICATION_STATE_EUTECTIC
Definition: cs_solidification.h:241
cs_solidification_voller_t * cs_solidification_get_voller_struct(void)
Get the structure defining the Voller model.
Definition: cs_solidification.cpp:3707
bool cs_solidification_is_activated(void)
Test if solidification module is activated.
Definition: cs_solidification.cpp:3194
void cs_solidification_set_stefan_model(cs_real_t t_change, cs_real_t latent_heat)
Set the main physical parameters which describe the Stefan model.
Definition: cs_solidification.cpp:3686
void cs_solidification_log_setup(void)
Summarize the solidification module in the log file dedicated to the setup.
Definition: cs_solidification.cpp:4670
void cs_solidification_set_kozeny_carman_parameters(double kozeny_constant, double tortuosity, double s_das)
Set the parameters involved in the computation of the permeability coefficient of the Kozeny-Carman r...
Definition: cs_solidification.cpp:3591
void cs_solidification_set_voller_model_no_velocity(cs_real_t t_solidus, cs_real_t t_liquidus, cs_real_t latent_heat)
Set the main physical parameters which describe the Voller and Prakash modelling.
Definition: cs_solidification.cpp:3812
cs_solidification_stefan_t * cs_solidification_get_stefan_struct(void)
Get the structure defining the Stefan model.
Definition: cs_solidification.cpp:3631
void cs_solidification_set_segr_functions(cs_solidification_func_t *vel_forcing, cs_solidification_func_t *cliq_update, cs_solidification_func_t *gliq_update, cs_solidification_func_t *thm_st_update)
Set the functions to perform the update of physical properties and/or the computation of the thermal ...
Definition: cs_solidification.cpp:4174
void cs_solidification_set_forcing_eps(cs_real_t forcing_eps)
Set the value of the epsilon parameter used in the forcing term of the momentum equation.
Definition: cs_solidification.cpp:3245
void cs_solidification_set_voller_model(cs_real_t beta, cs_real_t t_ref, cs_real_t t_solidus, cs_real_t t_liquidus, cs_real_t latent_heat)
Set the main physical parameters which describe the Voller and Prakash modelling.
Definition: cs_solidification.cpp:3773
struct _cs_time_plot_t cs_time_plot_t
Definition: cs_time_plot.h:44
Definition: mesh.f90:26
Structure storing information related to the "physical" boundaries associated with the computational ...
Definition: cs_boundary.h:154
Definition: cs_cdo_connect.h:57
Definition: cs_cdo_quantities.h:142
Main structure to handle the discretization and the resolution of an equation.
Structure to handle the convergence of an iterative algorithm.
Definition: cs_iter_algo.h:285
Definition: cs_mesh.h:85
Structure associated to the definition of a property relying on the cs_xdef_t structure.
Definition: cs_solidification.h:374
cs_real_t * c_l_faces
Definition: cs_solidification.h:476
cs_real_t t_eut_inf
Definition: cs_solidification.h:402
cs_solidification_func_t * update_clc
Definition: cs_solidification.h:432
cs_real_t ml
Definition: cs_solidification.h:392
cs_real_t kp
Definition: cs_solidification.h:389
cs_real_t * eta_coef_array
Definition: cs_solidification.h:495
const cs_real_t * temp_faces
Definition: cs_solidification.h:480
cs_real_t inv_ml
Definition: cs_solidification.h:393
cs_field_t * c_bulk
Definition: cs_solidification.h:485
cs_real_t * c_l_cells
Definition: cs_solidification.h:475
cs_solidification_func_t * update_velocity_forcing
Definition: cs_solidification.h:428
cs_solidification_func_t * update_thm_st
Definition: cs_solidification.h:424
cs_equation_t * solute_equation
Definition: cs_solidification.h:484
cs_real_t * t_liquidus
Definition: cs_solidification.h:502
cs_real_t t_melt
Definition: cs_solidification.h:397
cs_real_t * cliq_minus_cbulk
Definition: cs_solidification.h:507
cs_real_t dgldC_eut
Definition: cs_solidification.h:407
cs_real_t * tk_bulk
Definition: cs_solidification.h:466
double gliq_relax
Definition: cs_solidification.h:452
cs_real_t inv_kpm1
Definition: cs_solidification.h:391
cs_real_t inv_kp
Definition: cs_solidification.h:390
cs_real_t t_eut
Definition: cs_solidification.h:401
cs_real_t cs1
Definition: cs_solidification.h:406
cs_real_t t_eut_sup
Definition: cs_solidification.h:403
cs_real_t * tx_bulk
Definition: cs_solidification.h:468
cs_property_t * diff_pty
Definition: cs_solidification.h:491
double delta_tolerance
Definition: cs_solidification.h:450
cs_real_t diff_coef
Definition: cs_solidification.h:490
cs_real_t * tbulk_minus_tliq
Definition: cs_solidification.h:506
int n_iter_max
Definition: cs_solidification.h:449
cs_real_t ref_concentration
Definition: cs_solidification.h:382
cs_real_t * ck_bulk
Definition: cs_solidification.h:467
int iter
Definition: cs_solidification.h:448
cs_real_t c_eut
Definition: cs_solidification.h:405
cs_real_t * diff_pty_array
Definition: cs_solidification.h:492
cs_solidification_func_t * update_gl
Definition: cs_solidification.h:420
cs_real_t * cx_bulk
Definition: cs_solidification.h:469
cs_property_t * eta_coef_pty
Definition: cs_solidification.h:494
double eta_relax
Definition: cs_solidification.h:451
Definition: cs_solidification.h:294
cs_solidification_func_t * update_thm_st
Definition: cs_solidification.h:315
int n_iter_max
Definition: cs_solidification.h:320
cs_solidification_func_t * update_gl
Definition: cs_solidification.h:311
cs_real_t t_change
Definition: cs_solidification.h:304
double max_delta_h
Definition: cs_solidification.h:321
Definition: cs_solidification.h:515
cs_property_t * mass_density
Definition: cs_solidification.h:529
cs_solidification_strategy_t strategy
Definition: cs_solidification.h:598
int verbosity
Definition: cs_solidification.h:522
double forcing_coef
Definition: cs_solidification.h:635
cs_property_t * g_l
Definition: cs_solidification.h:554
cs_flag_t options
Definition: cs_solidification.h:518
cs_time_plot_t * plot_state
Definition: cs_solidification.h:562
cs_field_t * g_l_field
Definition: cs_solidification.h:552
cs_field_t * enthalpy
Definition: cs_solidification.h:581
cs_property_t * viscosity
Definition: cs_solidification.h:540
cs_real_t * forcing_mom_array
Definition: cs_solidification.h:605
cs_real_t latent_heat
Definition: cs_solidification.h:546
cs_real_t * thermal_source_term_array
Definition: cs_solidification.h:588
cs_flag_t post_flag
Definition: cs_solidification.h:520
cs_field_t * temperature
Definition: cs_solidification.h:576
cs_thermal_system_t * thermal_sys
Definition: cs_solidification.h:572
cs_solidification_state_t * cell_state
Definition: cs_solidification.h:558
cs_flag_t model
Definition: cs_solidification.h:517
double kozeny_constant
Definition: cs_solidification.h:633
double s_das
Definition: cs_solidification.h:632
cs_real_t * thermal_reaction_coef_array
Definition: cs_solidification.h:587
double tortuosity
Definition: cs_solidification.h:634
cs_property_t * forcing_mom
Definition: cs_solidification.h:607
cs_property_t * thermal_reaction_coef
Definition: cs_solidification.h:586
cs_lnum_t first_cell
Definition: cs_solidification.h:640
cs_property_t * cp
Definition: cs_solidification.h:534
void * model_context
Definition: cs_solidification.h:592
Definition: cs_solidification.h:337
cs_solidification_func_t * update_thm_st
Definition: cs_solidification.h:359
cs_iter_algo_t * nl_algo
Definition: cs_solidification.h:365
cs_real_t t_solidus
Definition: cs_solidification.h:347
cs_solidification_func_t * update_gl
Definition: cs_solidification.h:355
cs_real_t t_liquidus
Definition: cs_solidification.h:348
cs_param_nl_algo_t nl_algo_type
Definition: cs_solidification.h:364
Definition: cs_thermal_system.h:135