8.3
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-2024 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 "cs_base.h"
33#include "cs_boundary.h"
34#include "cs_equation.h"
35#include "cs_iter_algo.h"
36#include "cs_navsto_param.h"
37#include "cs_time_plot.h"
38#include "cs_time_step.h"
39
40/*----------------------------------------------------------------------------*/
41
43
44/*============================================================================
45 * Macro definitions
46 *============================================================================*/
47
92#define CS_SOLIDIFICATION_POST_CELL_STATE (1 << 0) /* = 1 */
93#define CS_SOLIDIFICATION_POST_ENTHALPY (1 << 1) /* = 2 */
94#define CS_SOLIDIFICATION_POST_CBULK_ADIM (1 << 2) /* = 4 */
95#define CS_SOLIDIFICATION_POST_CLIQ (1 << 3) /* = 8 */
96#define CS_SOLIDIFICATION_POST_LIQUIDUS_TEMPERATURE (1 << 4) /* = 16 */
97#define CS_SOLIDIFICATION_POST_SEGREGATION_INDEX (1 << 5) /* = 32 */
98#define CS_SOLIDIFICATION_POST_SOLIDIFICATION_RATE (1 << 6) /* = 64 */
99#define CS_SOLIDIFICATION_ADVANCED_ANALYSIS (1 << 7) /* = 128 */
100
132#define CS_SOLIDIFICATION_USE_ENTHALPY_VARIABLE (1 << 0) /*= 1 */
133#define CS_SOLIDIFICATION_NO_VELOCITY_FIELD (1 << 1) /*= 2 */
134#define CS_SOLIDIFICATION_WITH_SOLUTE_SOURCE_TERM (1 << 2) /*= 4 */
135#define CS_SOLIDIFICATION_USE_EXTRAPOLATION (1 << 3) /*= 8 */
136#define CS_SOLIDIFICATION_WITH_PENALIZED_EUTECTIC (1 << 4) /*= 16 */
137
138/* Automatically set by the code if user functions are used
139 * The following flags are set when calling \ref cs_solidification_set_functions
140 *
141 * \def CS_SOLIDIFICATION_BINARY_ALLOY_M_FUNC
142 * \brief the update of the forcing term (penalization) in the momentum equation
143 * is defined using a user function
144 *
145 * \def CS_SOLIDIFICATION_BINARY_ALLOY_C_FUNC
146 * \brief the update of the liquid concentration of the binary alloy is defined
147 * using a user function
148 *
149 * \def CS_SOLIDIFICATION_BINARY_ALLOY_G_FUNC
150 * \brief the update of the liquid fraction is defined using a user function
151 *
152 * \def CS_SOLIDIFICATION_BINARY_ALLOY_T_FUNC
153 * \brief the update of the thermal source term is defined using a user function
154 */
155#define CS_SOLIDIFICATION_BINARY_ALLOY_M_FUNC (1 << 7) /*= 128 */
156#define CS_SOLIDIFICATION_BINARY_ALLOY_C_FUNC (1 << 8) /*= 256 */
157#define CS_SOLIDIFICATION_BINARY_ALLOY_G_FUNC (1 << 9) /*= 512 */
158#define CS_SOLIDIFICATION_BINARY_ALLOY_T_FUNC (1 <<10) /*= 1024 */
159
164/*=============================================================================
165 * Structure and type definitions
166 *============================================================================*/
167
195typedef enum {
196
201
203
205
225typedef enum {
226
231
233
235
243typedef enum {
244
248
250
252
253/*----------------------------------------------------------------------------*/
264/*----------------------------------------------------------------------------*/
265
266typedef void
268 const cs_cdo_connect_t *connect,
269 const cs_cdo_quantities_t *quant,
270 const cs_time_step_t *ts);
271
272/* Structure storing physical parameters related to a choice of solidification
273 modelling */
274
275/*----------------------------------------------------------------------------
276 * Stefan model
277 *----------------------------------------------------------------------------
278 *
279 * Neither advection nor segregation is taken into account.
280 * The liquid fraction is a step function w.r.t. the temperature.
281 */
282
283typedef struct {
284
285 /* Physical parameters to specify the law of variation of the liquid fraction
286 * with respect to the temperature
287 *
288 * gl(T) = 1 if T > T_change
289 * Otherwise:
290 * gl(T) = 0
291 */
292
294
295 /* Function pointers */
296 /* ----------------- */
297
298 /* Function to update the liquid fraction */
299
301
302 /* Function to update the source term for the thermal equation */
303
305
306 /* Numerical parameters */
307 /* -------------------- */
308
311
313
314
315/* Voller and Prakash model "A fixed grid numerical modelling methodology for
316 * convection-diffusion mushy region phase-change problems" Int. J. Heat
317 * Transfer, 30 (8), 1987.
318 * No tracer. Only physical constants describing the solidification process are
319 * used.
320 */
321
322/*----------------------------------------------------------------------------
323 * Solidification without segregation (Voller & Prakash'87 model)
324 *----------------------------------------------------------------------------*/
325
326typedef struct {
327
328 /* Physical parameters to specify the law of variation of the liquid fraction
329 * with respect to the temperature
330 *
331 * gl(T) = 1 if T > t_liquidus and gl(T) = 0 if T < t_solidus
332 * Otherwise:
333 * gl(T) = (T - t_solidus)/(t_liquidus - t_solidus)
334 */
335
338
339 /* Function pointers */
340 /* ----------------- */
341
342 /* Function to update the liquid fraction */
343
345
346 /* Function to update the source term for the thermal equation */
347
349
350 /* Numerical parameters */
351 /* -------------------- */
352
355
357
358
359/*----------------------------------------------------------------------------
360 * Solidification of a binary alloy with segregation (Voller & Prakash'89 model)
361 *----------------------------------------------------------------------------*/
362
363typedef struct {
364
365 /* Alloy features */
366 /* -------------- */
367
368 /* Reference mixture concentration (used in the Boussinesq approximation and
369 * for normalization */
370
372
373 /* Phase diagram features for an alloy with the component A and B */
374 /* -------------------------------------------------------------- */
375
376 /* Physical parameters */
377
378 cs_real_t kp; /* distribution coefficient */
379 cs_real_t inv_kp; /* reciprocal of kp */
380 cs_real_t inv_kpm1; /* 1/(kp - 1) */
381 cs_real_t ml; /* Liquidus slope \frac{\partial g_l}{\partial C} */
382 cs_real_t inv_ml; /* reciprocal of ml */
383
384 /* Temperature of phase change for the pure material (conc = 0) */
385
387
388 /* Eutectic point: temperature and concentration */
389
393
397
398 /* The variable related to this equation in the solute concentration of
399 * the mixture: c_bulk (c_s in the solid phase and c_l in the liquid phase)
400 * c_bulk = gs*c_s + gl*c_l where gs + gl = 1
401 * gl is the liquid fraction and gs the solid fraction
402 * c_s = kp * c_l (lever rule is assumed up to now)
403 *
404 * --> c_bulk = (gs*kp + gl)*c_l
405 */
406
407 /* Function to update the liquid fraction */
408
410
411 /* Function to update the source term for the thermal equation */
412
414
415 /* Function to update the velocity forcing in the momentum equation */
416
418
419 /* Function to update c_l in each cell */
420
422
423 /* Drive the convergence of the coupled system (solute transport and thermal
424 * equation) with respect to the following criteria (taken from Voller and
425 * Swaminathan'91)
426 * max_{c\in C} |Temp^(k+1) - Temp^(k)| < delta_tolerance
427 * max_{c\in C} |Cbulk^(k+1) - Cbulk*^(k)| < delta_tolerance
428 * n_iter < n_iter_max
429 *
430 * eta_relax: add a relaxation in the update of the eta coefficient
431 * conc_liq = eta_coef * conc_bulk
432 * eta_relax = 0. --> No relaxation (default choice)
433 *
434 * gliq_relax: idem but for the liquid fraction
435 */
436
437 int iter;
440 double eta_relax;
442
443 /* During the non-linear iteration process one needs:
444 * temp_{n} --> stored in field->val_pre
445 * temp_{n+1}^k --> stored in tk_bulk (in this structure)
446 * temp_{n+1}^{k+1} --> stored in field->val
447 *
448 * Optionally one may consider an extrapolated temperature and bulk
449 * concentration
450 * temp_{n+1}^{extrap} = 2*temp_{n} - temp_{n-1}
451 *
452 * Same thing for the bulk concentration.
453 */
454
459
460 /* Solute concentration in the liquid phase
461 * 1) array of the last computed values at cells
462 * 2) array of the last computed values at faces (interior and border) */
463
466
467 /* Temperature values at faces (this is not owned by the structure) */
468
470
471 /* Equation for the solute transport and related quantities */
472
475
476 /* Diffusion coefficient for the solute in the liquid phase
477 * diff_pty_val = rho * g_l * diff_coef */
478
482
485
486 /* Optional post-processing arrays */
487 /* ------------------------------ */
488
489 /* Liquidus temperature (values at cell centers) */
490
492
493 /* Quantities for advanced analysis */
494
497
499
500/*----------------------------------------------------------------------------
501 * Main structure to manage the solidification process
502 *----------------------------------------------------------------------------*/
503
504typedef struct {
505
506 cs_flag_t model; /* Modelling for the solidification module */
507 cs_flag_t options; /* Flag dedicated to general options to handle
508 * the solidification module*/
509 cs_flag_t post_flag; /* Flag dedicated to the post-processing
510 * of the solidification module */
511 int verbosity; /* Level of verbosity */
512
513 /* Physical properties common to all models */
514 /* ---------------------------------------- */
515
516 /* Mass density of the liquid/solid media */
517
519
520 /* Reference value for the heat capacity in the solidification/melting area
521 * (assumed to be uniform) */
522
524
525 /* Viscosity (pointer to the total viscosity which should be equal to the
526 * laminar viscosity since no turbulence modelling is usually taken into
527 * account */
528
530
531 /* Physical parameter for computing the source term in the energy equation
532 * Latent heat between the liquid and solid phase
533 */
534
536
537
538 /* Liquid fraction of the mixture */
539 /* ------------------------------ */
540
541 cs_field_t *g_l_field; /* field storing the values of the liquid
542 fraction at each cell */
543 cs_property_t *g_l; /* liquid fraction property */
544
545 /* array storing the state (solid, mushy, liquid) for each cell */
546
548
549 /* Plot evolution of the solidification process */
550
552
553 /* Monitoring related to this module */
554
557
558 /* Quantities related to the energy equation */
559 /* ----------------------------------------- */
560
562
563 /* Fields associated to this module */
564
566
567 /* Enthalpy (by default this a derived field which can be used to update of
568 the liquid fraction) */
569
571
572
573 /* A reaction term and source term are introduced in the thermal model */
574
578
579 /* Additional settings related to the choice of solidification modelling */
580
582
583 /* Strategy to update quantities during the solidification process. These
584 * quantities are the liquid fraction, the thermal source term for
585 * instance */
586
588
589 /* A reaction term is introduced in the momentum equation. This terms tends to
590 * a huge number when the liquid fraction tends to 0 in order to penalize
591 * the velocity to zero when the whole cell is solid
592 */
593
594 cs_real_t *forcing_mom_array; /* values of the forcing reaction
595 coefficient in each cell */
597
598 /* Porous media model acting as a reaction term in the momentum equation:
599 *
600 * forcing_coef = visco0 / KC
601 * where visco0 is the laminar viscosity and K the permeability
602 *
603 * The Kozeny-Carman relation gives a value of the permeability coefficient
604 *
605 * KC = gl^3 * s_das^2 / (PI^2 * Kozeny_const * tau^2 * (1 - gl)^2)
606 *
607 * where
608 * - gl is the liquid fraction
609 * - s_das is the secondary dendrite arm spacing [m]
610 * - Kozeny_const is the Kozeny constant
611 * - tau is the tortuosity coefficient
612 *
613 * One gathers all parameters which are constant during the simulation
614 * in the parameter "forcing_coef"
615 *
616 * F(u) = forcing_coef * (1- gl)^2/(gl^3 + forcing_eps) * u
617 *
618 * There is slight modification in order to avoid a division by zero.
619 */
620
621 double s_das; /* default is 0.00085 m */
622 double kozeny_constant; /* default value is 5.0 */
623 double tortuosity; /* default value is 2.0 */
625
626 /* First cell associated to a fluid/solid area (i.e. not associated to
627 * a permanent solid zone) */
628
630
632
633/*============================================================================
634 * Public function prototypes
635 *============================================================================*/
636
637/*----------------------------------------------------------------------------*/
641/*----------------------------------------------------------------------------*/
642
643bool
645
646/*----------------------------------------------------------------------------*/
652/*----------------------------------------------------------------------------*/
653
656
657/*----------------------------------------------------------------------------*/
663/*----------------------------------------------------------------------------*/
664
665void
667
668/*----------------------------------------------------------------------------*/
676/*----------------------------------------------------------------------------*/
677
678void
680
681/*----------------------------------------------------------------------------*/
696/*----------------------------------------------------------------------------*/
697
700 cs_flag_t options,
701 cs_flag_t post_flag,
702 const cs_boundary_t *boundaries,
704 cs_navsto_param_model_flag_t ns_model_flag,
705 cs_navsto_param_coupling_t algo_coupling,
706 cs_navsto_param_post_flag_t ns_post_flag);
707
708/*----------------------------------------------------------------------------*/
718/*----------------------------------------------------------------------------*/
719
720void
722 double tortuosity,
723 double s_das);
724
725/*----------------------------------------------------------------------------*/
731/*----------------------------------------------------------------------------*/
732
735
736/*----------------------------------------------------------------------------*/
742/*----------------------------------------------------------------------------*/
743
746
747/*----------------------------------------------------------------------------*/
754/*----------------------------------------------------------------------------*/
755
756void
758 cs_real_t latent_heat);
759
760/*----------------------------------------------------------------------------*/
766/*----------------------------------------------------------------------------*/
767
770
771/*----------------------------------------------------------------------------*/
777/*----------------------------------------------------------------------------*/
778
781
782/*----------------------------------------------------------------------------*/
793/*----------------------------------------------------------------------------*/
794
795void
797 cs_real_t t_ref,
798 cs_real_t t_solidus,
799 cs_real_t t_liquidus,
800 cs_real_t latent_heat);
801
802/*----------------------------------------------------------------------------*/
811/*----------------------------------------------------------------------------*/
812
813void
815 cs_real_t t_liquidus,
816 cs_real_t latent_heat);
817
818/*----------------------------------------------------------------------------*/
824/*----------------------------------------------------------------------------*/
825
828
829/*----------------------------------------------------------------------------*/
836/*----------------------------------------------------------------------------*/
837
840
841/*----------------------------------------------------------------------------*/
862/*----------------------------------------------------------------------------*/
863
864void
866 const char *varname,
867 cs_real_t beta_t,
868 cs_real_t temp0,
869 cs_real_t beta_c,
870 cs_real_t conc0,
871 cs_real_t kp,
872 cs_real_t mliq,
873 cs_real_t t_eutec,
874 cs_real_t t_melt,
875 cs_real_t solute_diff,
876 cs_real_t latent_heat);
877
878/*----------------------------------------------------------------------------*/
885/*----------------------------------------------------------------------------*/
886
887void
889
890/*----------------------------------------------------------------------------*/
907/*----------------------------------------------------------------------------*/
908
909void
911 cs_solidification_func_t *cliq_update,
912 cs_solidification_func_t *gliq_update,
913 cs_solidification_func_t *thm_st_update);
914
915/*----------------------------------------------------------------------------*/
921/*----------------------------------------------------------------------------*/
922
925
926/*----------------------------------------------------------------------------*/
930/*----------------------------------------------------------------------------*/
931
932void
934
935/*----------------------------------------------------------------------------*/
943/*----------------------------------------------------------------------------*/
944
945void
947 const cs_cdo_quantities_t *quant);
948
949/*----------------------------------------------------------------------------*/
954/*----------------------------------------------------------------------------*/
955
956void
958
959/*----------------------------------------------------------------------------*/
969/*----------------------------------------------------------------------------*/
970
971void
973 const cs_cdo_connect_t *connect,
974 const cs_cdo_quantities_t *quant,
975 const cs_time_step_t *time_step);
976
977/*----------------------------------------------------------------------------*/
986/*----------------------------------------------------------------------------*/
987
988void
990 const cs_cdo_connect_t *connect,
991 const cs_cdo_quantities_t *quant,
992 const cs_time_step_t *time_step);
993
994/*----------------------------------------------------------------------------*/
1002/*----------------------------------------------------------------------------*/
1003
1004void
1006 const cs_cdo_quantities_t *quant,
1007 const cs_time_step_t *ts);
1008
1009/*----------------------------------------------------------------------------*/
1031/*----------------------------------------------------------------------------*/
1032
1033void
1035 int mesh_id,
1036 int cat_id,
1037 int ent_flag[5],
1038 cs_lnum_t n_cells,
1039 cs_lnum_t n_i_faces,
1040 cs_lnum_t n_b_faces,
1041 const cs_lnum_t cell_ids[],
1042 const cs_lnum_t i_face_ids[],
1043 const cs_lnum_t b_face_ids[],
1044 const cs_time_step_t *time_step);
1045
1046/*----------------------------------------------------------------------------*/
1047
1049
1050#endif /* __CS_SOLIDIFICATION_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
uint64_t cs_gnum_t
global mesh entity number
Definition: cs_defs.h:325
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
unsigned short int cs_flag_t
Definition: cs_defs.h:344
cs_flag_t cs_navsto_param_post_flag_t
Definition: cs_navsto_param.h:59
cs_navsto_param_coupling_t
Choice of algorithm for solving the system.
Definition: cs_navsto_param.h:229
cs_navsto_param_model_t
Describe the system of equations related to the Navier-Stokes to be solved.
Definition: cs_navsto_param.h:82
cs_flag_t cs_navsto_param_model_flag_t
Definition: cs_navsto_param.h:58
cs_param_nl_algo_t
Class of non-linear iterative algorithm.
Definition: cs_param_types.h:606
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)
Solve equations related to the solidification module.
Definition: cs_solidification.cpp:5102
cs_solidification_binary_alloy_t * cs_solidification_get_binary_alloy_struct(void)
Get the structure defining the binary alloy model.
Definition: cs_solidification.cpp:3844
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:3740
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:4061
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:3874
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:267
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:5158
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:4889
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:3663
cs_solidification_t * cs_solidification_get_structure(void)
Retrieve the main structure to deal with solidification process.
Definition: cs_solidification.cpp:3214
cs_solidification_model_t
Type of physical model used to simulate the solidifcation/fusion process.
Definition: cs_solidification.h:195
@ CS_SOLIDIFICATION_MODEL_BINARY_ALLOY
Definition: cs_solidification.h:200
@ CS_SOLIDIFICATION_MODEL_VOLLER_NL
Definition: cs_solidification.h:199
@ CS_SOLIDIFICATION_MODEL_VOLLER_PRAKASH_87
Definition: cs_solidification.h:198
@ CS_SOLIDIFICATION_N_MODELS
Definition: cs_solidification.h:202
@ CS_SOLIDIFICATION_MODEL_STEFAN
Definition: cs_solidification.h:197
void cs_solidification_init_setup(void)
Setup equations/properties related to the solidification module.
Definition: cs_solidification.cpp:4315
cs_solidification_t * cs_solidification_destroy_all(void)
Free the main structure related to the solidification module.
Definition: cs_solidification.cpp:4220
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:243
@ CS_SOLIDIFICATION_STRATEGY_LEGACY
Definition: cs_solidification.h:245
@ CS_SOLIDIFICATION_STRATEGY_TAYLOR
Definition: cs_solidification.h:246
@ CS_SOLIDIFICATION_STRATEGY_PATH
Definition: cs_solidification.h:247
@ CS_SOLIDIFICATION_N_STRATEGIES
Definition: cs_solidification.h:249
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:3933
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:4476
void cs_solidification_set_verbosity(int verbosity)
Set the level of verbosity for the solidification module.
Definition: cs_solidification.cpp:3228
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:3272
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:5320
cs_solidification_state_t
Kind of state in which a cell or an entity is.
Definition: cs_solidification.h:225
@ CS_SOLIDIFICATION_STATE_SOLID
Definition: cs_solidification.h:227
@ CS_SOLIDIFICATION_N_STATES
Definition: cs_solidification.h:232
@ CS_SOLIDIFICATION_STATE_LIQUID
Definition: cs_solidification.h:229
@ CS_SOLIDIFICATION_STATE_MUSHY
Definition: cs_solidification.h:228
@ CS_SOLIDIFICATION_STATE_EUTECTIC
Definition: cs_solidification.h:230
cs_solidification_voller_t * cs_solidification_get_voller_struct(void)
Get the structure defining the Voller model.
Definition: cs_solidification.cpp:3710
bool cs_solidification_is_activated(void)
Test if solidification module is activated.
Definition: cs_solidification.cpp:3197
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:3689
void cs_solidification_log_setup(void)
Summarize the solidification module in the log file dedicated to the setup.
Definition: cs_solidification.cpp:4674
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:3594
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:3815
cs_solidification_stefan_t * cs_solidification_get_stefan_struct(void)
Get the structure defining the Stefan model.
Definition: cs_solidification.cpp:3634
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:4175
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:3248
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:3776
struct _cs_time_plot_t cs_time_plot_t
Definition: cs_time_plot.h:48
Definition: mesh.f90:26
Structure storing information related to the "physical" boundaries associated with the computational ...
Definition: cs_boundary.h:155
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:139
Main structure to handle the discretization and the resolution of an equation.
Field descriptor.
Definition: cs_field.h:131
Structure to handle the convergence of an iterative algorithm.
Definition: cs_iter_algo.h:290
Definition: cs_mesh.h:85
Structure associated to the definition of a property relying on the cs_xdef_t structure.
Definition: cs_solidification.h:363
cs_real_t * c_l_faces
Definition: cs_solidification.h:465
cs_real_t t_eut_inf
Definition: cs_solidification.h:391
cs_solidification_func_t * update_clc
Definition: cs_solidification.h:421
cs_real_t ml
Definition: cs_solidification.h:381
cs_real_t kp
Definition: cs_solidification.h:378
cs_real_t * eta_coef_array
Definition: cs_solidification.h:484
const cs_real_t * temp_faces
Definition: cs_solidification.h:469
cs_real_t inv_ml
Definition: cs_solidification.h:382
cs_field_t * c_bulk
Definition: cs_solidification.h:474
cs_real_t * c_l_cells
Definition: cs_solidification.h:464
cs_solidification_func_t * update_velocity_forcing
Definition: cs_solidification.h:417
cs_solidification_func_t * update_thm_st
Definition: cs_solidification.h:413
cs_equation_t * solute_equation
Definition: cs_solidification.h:473
cs_real_t * t_liquidus
Definition: cs_solidification.h:491
cs_real_t t_melt
Definition: cs_solidification.h:386
cs_real_t * cliq_minus_cbulk
Definition: cs_solidification.h:496
cs_real_t dgldC_eut
Definition: cs_solidification.h:396
cs_real_t * tk_bulk
Definition: cs_solidification.h:455
double gliq_relax
Definition: cs_solidification.h:441
cs_real_t inv_kpm1
Definition: cs_solidification.h:380
cs_real_t inv_kp
Definition: cs_solidification.h:379
cs_real_t t_eut
Definition: cs_solidification.h:390
cs_real_t cs1
Definition: cs_solidification.h:395
cs_real_t t_eut_sup
Definition: cs_solidification.h:392
cs_real_t * tx_bulk
Definition: cs_solidification.h:457
cs_property_t * diff_pty
Definition: cs_solidification.h:480
double delta_tolerance
Definition: cs_solidification.h:439
cs_real_t diff_coef
Definition: cs_solidification.h:479
cs_real_t * tbulk_minus_tliq
Definition: cs_solidification.h:495
int n_iter_max
Definition: cs_solidification.h:438
cs_real_t ref_concentration
Definition: cs_solidification.h:371
cs_real_t * ck_bulk
Definition: cs_solidification.h:456
int iter
Definition: cs_solidification.h:437
cs_real_t c_eut
Definition: cs_solidification.h:394
cs_real_t * diff_pty_array
Definition: cs_solidification.h:481
cs_solidification_func_t * update_gl
Definition: cs_solidification.h:409
cs_real_t * cx_bulk
Definition: cs_solidification.h:458
cs_property_t * eta_coef_pty
Definition: cs_solidification.h:483
double eta_relax
Definition: cs_solidification.h:440
Definition: cs_solidification.h:283
cs_solidification_func_t * update_thm_st
Definition: cs_solidification.h:304
int n_iter_max
Definition: cs_solidification.h:309
cs_solidification_func_t * update_gl
Definition: cs_solidification.h:300
cs_real_t t_change
Definition: cs_solidification.h:293
double max_delta_h
Definition: cs_solidification.h:310
Definition: cs_solidification.h:504
cs_property_t * mass_density
Definition: cs_solidification.h:518
cs_solidification_strategy_t strategy
Definition: cs_solidification.h:587
int verbosity
Definition: cs_solidification.h:511
double forcing_coef
Definition: cs_solidification.h:624
cs_property_t * g_l
Definition: cs_solidification.h:543
cs_flag_t options
Definition: cs_solidification.h:507
cs_time_plot_t * plot_state
Definition: cs_solidification.h:551
cs_field_t * g_l_field
Definition: cs_solidification.h:541
cs_field_t * enthalpy
Definition: cs_solidification.h:570
cs_property_t * viscosity
Definition: cs_solidification.h:529
cs_real_t * forcing_mom_array
Definition: cs_solidification.h:594
cs_real_t latent_heat
Definition: cs_solidification.h:535
cs_real_t * thermal_source_term_array
Definition: cs_solidification.h:577
cs_flag_t post_flag
Definition: cs_solidification.h:509
cs_field_t * temperature
Definition: cs_solidification.h:565
cs_thermal_system_t * thermal_sys
Definition: cs_solidification.h:561
cs_solidification_state_t * cell_state
Definition: cs_solidification.h:547
cs_flag_t model
Definition: cs_solidification.h:506
double kozeny_constant
Definition: cs_solidification.h:622
double s_das
Definition: cs_solidification.h:621
cs_real_t * thermal_reaction_coef_array
Definition: cs_solidification.h:576
double tortuosity
Definition: cs_solidification.h:623
cs_property_t * forcing_mom
Definition: cs_solidification.h:596
cs_property_t * thermal_reaction_coef
Definition: cs_solidification.h:575
cs_lnum_t first_cell
Definition: cs_solidification.h:629
cs_property_t * cp
Definition: cs_solidification.h:523
void * model_context
Definition: cs_solidification.h:581
Definition: cs_solidification.h:326
cs_solidification_func_t * update_thm_st
Definition: cs_solidification.h:348
cs_iter_algo_t * nl_algo
Definition: cs_solidification.h:354
cs_real_t t_solidus
Definition: cs_solidification.h:336
cs_solidification_func_t * update_gl
Definition: cs_solidification.h:344
cs_real_t t_liquidus
Definition: cs_solidification.h:337
cs_param_nl_algo_t nl_algo_type
Definition: cs_solidification.h:353
Definition: cs_thermal_system.h:132
time step descriptor
Definition: cs_time_step.h:64