6.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-2020 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_navsto_param.h"
36 #include "cs_time_plot.h"
37 #include "cs_time_step.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
51 /*============================================================================
52  * Macro definitions
53  *============================================================================*/
54 
98 #define CS_SOLIDIFICATION_POST_CBULK_ADIM (1 << 0) /* = 1 */
99 #define CS_SOLIDIFICATION_POST_CLIQ (1 << 1) /* = 2 */
100 #define CS_SOLIDIFICATION_POST_CELL_STATE (1 << 2) /* = 4 */
101 #define CS_SOLIDIFICATION_POST_LIQUIDUS_TEMPERATURE (1 << 3) /* = 8 */
102 #define CS_SOLIDIFICATION_POST_SEGREGATION_INDEX (1 << 4) /* = 16 */
103 #define CS_SOLIDIFICATION_POST_SOLIDIFICATION_RATE (1 << 5) /* = 32 */
104 #define CS_SOLIDIFICATION_ADVANCED_ANALYSIS (1 << 6) /* = 64 */
105 
130 #define CS_SOLIDIFICATION_WITH_SOLUTE_SOURCE_TERM (1 << 0) /*= 1 */
131 #define CS_SOLIDIFICATION_USE_EXTRAPOLATION (1 << 1) /*= 2 */
132 #define CS_SOLIDIFICATION_WITH_PENALIZED_EUTECTIC (1 << 2) /*= 4 */
133 
134 /* Automatically set by the code if user functions are used */
135 #define CS_SOLIDIFICATION_BINARY_ALLOY_M_FUNC (1 << 7) /*= 128 */
136 #define CS_SOLIDIFICATION_BINARY_ALLOY_C_FUNC (1 << 8) /*= 256 */
137 #define CS_SOLIDIFICATION_BINARY_ALLOY_G_FUNC (1 << 9) /*= 512 */
138 #define CS_SOLIDIFICATION_BINARY_ALLOY_T_FUNC (1 <<10) /*= 1024 */
139 #define CS_SOLIDIFICATION_BINARY_ALLOY_TCC_FUNC (1 <<11) /*= 2048 */
140 
145 /*=============================================================================
146  * Structure and type definitions
147  *============================================================================*/
148 
150 
173 typedef enum {
174 
175  /* Main modelling for the dynamic
176  ------------------------------ */
177 
180 
181  /* Main modelling for the thermal system
182  ------------------------------------- */
183 
186 
187  /* Solidification modelling
188  ------------------------ */
189 
192 
194 
199 typedef enum {
200 
205 
207 
209 
217 typedef enum {
218 
222 
224 
226 
227 /*----------------------------------------------------------------------------*/
238 /*----------------------------------------------------------------------------*/
239 
240 typedef void
242  const cs_cdo_connect_t *connect,
243  const cs_cdo_quantities_t *quant,
244  const cs_time_step_t *ts);
245 
246 /* Structure storing physical parameters related to a choice of solidification
247  modelling */
248 
249 /* Voller and Prakash model "A fixed grid numerical modelling methodology for
250  * convection-diffusion mushy region phase-change problems" Int. J. Heat
251  * Transfer, 30 (8), 1987.
252  * No tracer. Only physical constants describing the solidification process are
253  * used.
254  */
255 
256 /*----------------------------------------------------------------------------
257  * Solidification without segregation (Voller & Prakash'87 model)
258  *----------------------------------------------------------------------------*/
259 
260 typedef struct {
261 
262  /* Secondary dendrite arm spacing */
264 
265  /* Physical parameters to specify the law of variation of the liquid fraction
266  * with respect to the temperature
267  *
268  * gl(T) = 1 if T > t_liquidus and gl(T) = 0 if T < t_solidus
269  * Otherwise:
270  * gl(T) = (T - t_solidus)/(t_liquidus - t_solidus)
271  */
272 
275 
276  /* Physical parameter for computing the source term in the energy equation
277  * Latent heat between the liquid and solid phase
278  */
280 
281  /* Function pointer related to the way of updating the model */
283 
285 
286 
287 /*----------------------------------------------------------------------------
288  * Solidification of a binary alloy with segregation (Voller & Prakash'89 model)
289  *----------------------------------------------------------------------------*/
290 
291 typedef struct {
292 
293  /* Parameters for the Boussinesq approximation in the momentum equation
294  * related to solute concentration:
295  * solutal dilatation/expansion coefficient and the reference mixture
296  * concentration for the binary alloy
297  */
300 
301  /* Physical parameter for computing the source term in the energy equation
302  * Latent heat between the liquid and solid phase
303  */
305 
306  /* Phase diagram features for an alloy with the component A and B */
307  /* -------------------------------------------------------------- */
308 
309  /* Temperature of phase change for the pure material (conc = 0) */
311 
312  /* Secondary dendrite arm spacing */
314 
315  /* Eutectic point: temperature and concentration */
319 
323 
324  /* Physical parameters */
325  cs_real_t kp; /* distribution coefficient */
326  cs_real_t inv_kp; /* reciprocal of kp */
327  cs_real_t inv_kpm1; /* 1/(kp - 1) */
328  cs_real_t ml; /* Liquidus slope \frac{\partial g_l}{\partial C} */
329  cs_real_t inv_ml; /* reciprocal of ml */
330 
331  /* Function to update the velocity forcing in the momentum equation */
333 
334  /* Function to update the liquid fraction */
336 
337  /* Function to update c_l in each cell */
339 
340  /* Function to update the source term for the thermal equation */
342 
343  /* Function to compute the thermo-solutal coupling (previous function pointers
344  are called inside this function by default but a user can defined whatever
345  is needed inside */
347 
348  /* Alloy features */
349  /* -------------- */
350 
353 
354  /* The variable related to this equation in the solute concentration of
355  * the mixture: c_bulk (c_s in the solid phase and c_l in the liquid phase)
356  * c_bulk = gs*c_s + gl*c_l where gs + gl = 1
357  * gl is the liquid fraction and gs the solid fraction
358  * c_s = kp * c_l (lever rule is assumed up to now)
359  *
360  * --> c_bulk = (gs*kp + gl)*c_l
361  */
362 
363  /* Drive the convergence of the coupled system (solute transport and thermal
364  * equation) with respect to the following criteria (taken from Voller and
365  * Swaminathan'91)
366  * max_{c\in C} |Temp^(k+1) - Temp^(k)| < delta_tolerance
367  * max_{c\in C} |Cbulk^(k+1) - Cbulk*^(k)| < delta_tolerance
368  * n_iter < n_iter_max
369  *
370  * eta_relax: add a relaxation in the update of the eta coefficient
371  * conc_liq = eta_coef * conc_bulk
372  * eta_relax = 0. --> No relaxation (default choice)
373  *
374  * gliq_relax: idem but for the liquid fraction
375  */
376 
377  int iter;
380  double eta_relax;
381  double gliq_relax;
383 
384  /* During the non-linear iteration process one needs:
385  * temp_{n} --> stored in field->val_pre
386  * temp_{n+1}^k --> stored in tk_bulk (in this structure)
387  * temp_{n+1}^{k+1} --> stored in field->val
388  *
389  * Optionally one may consider an extrapolated temperature and bulk
390  * concentration
391  * temp_{n+1}^{extrap} = 2*temp_{n} - temp_{n-1}
392  *
393  * Same thing for the bulk concentration.
394  */
399 
400  /* Solute concentration in the liquid phase
401  * 1) array of the last computed values at cells
402  * 2) array of the last computed values at faces (interior and border) */
405 
406  /* Temperature values at faces (this is not owned by the structure) */
408 
409  /* Diffusion coefficient for the solute in the liquid phase
410  * diff_pty_val = rho * g_l * diff_coef */
414 
417 
418  /* Optional postprocessing arrays */
419  /* ------------------------------ */
420 
421  /* Liquidus temperature (values at cell centers) */
423 
424  /* Quantities for advanced analysis */
427 
429 
430 /*----------------------------------------------------------------------------
431  * Main structure to manage the solidification process
432  *----------------------------------------------------------------------------*/
433 
434 typedef struct {
435 
436  cs_flag_t model; /* Modelling for the solidifcation module */
437  cs_flag_t options; /* Flag dedicated to general options to handle
438  * the solidification module*/
439  cs_flag_t post_flag; /* Flag dedicated to the post-processing
440  * of the solidifcation module */
441  int verbosity; /* Level of verbosity */
442 
443  /* Mass density of the liquid/solid media */
446 
447  /* Heat capacity in the solidification/melting area (assumed to be uniform) */
449 
450  /* Laminar dynamic viscosity */
452 
453  /* Liquid fraction of the mixture */
454  /* ------------------------------ */
455 
456  cs_field_t *g_l_field; /* field storing the values of the liquid
457  fraction at each cell */
458  cs_property_t *g_l; /* liquid fraction property */
459 
460  /* array storing the state (solid, mushy, liquid) for each cell */
462 
463  /* Plot evolution of the solidification process */
465 
466  /* Monitoring related to this module */
469 
470  /* Quantities related to the energy equation */
471  /* ----------------------------------------- */
472 
474 
475  /* Fields associated to this module */
477 
478  /* A reaction term and source term are introduced in the thermal model */
482 
483  /* Additional settings related to the choice of solidification modelling */
485 
486  /* A reaction term is introduced in the momentum equation. This terms tends to
487  * a huge number when the liquid fraction tends to 0 in order to penalize
488  * the velocity to zero when the whole cell is solid
489  */
490  cs_real_t *forcing_mom_array; /* values of the forcing reaction
491  coefficient in each cell */
493 
494  /* Porous media like reaction term in the momentum equation:
495  *
496  * forcing_coef = 180 * visco0 / s_das^2
497  * where visco0 is the laminar viscosity and s_das is the secondary
498  * dendrite arm spacing
499  * F(u) = forcing_coef * (1- gl)^2/(gl^3 + forcing_eps) * u
500  */
502 
503  /* First cell associated to a fluid/solid area (i.e. not associated to
504  * a permanent solid zone) */
506 
508 
509 /*============================================================================
510  * Public function prototypes
511  *============================================================================*/
512 
513 /*----------------------------------------------------------------------------*/
517 /*----------------------------------------------------------------------------*/
518 
519 bool
521 
522 /*----------------------------------------------------------------------------*/
528 /*----------------------------------------------------------------------------*/
529 
532 
533 /*----------------------------------------------------------------------------*/
539 /*----------------------------------------------------------------------------*/
540 
541 void
542 cs_solidification_set_verbosity(int verbosity);
543 
544 /*----------------------------------------------------------------------------*/
558 /*----------------------------------------------------------------------------*/
559 
562  cs_flag_t options,
563  cs_flag_t post_flag,
564  const cs_boundary_t *boundaries,
565  cs_navsto_param_coupling_t algo_coupling,
566  cs_flag_t ns_option,
567  cs_flag_t ns_post_flag);
568 
569 /*----------------------------------------------------------------------------*/
577 /*----------------------------------------------------------------------------*/
578 
579 void
581 
582 /*----------------------------------------------------------------------------*/
592 /*----------------------------------------------------------------------------*/
593 
594 void
596  cs_real_t t_liquidus,
597  cs_real_t latent_heat,
598  cs_real_t s_das);
599 
600 /*----------------------------------------------------------------------------*/
620 /*----------------------------------------------------------------------------*/
621 
622 void
624  const char *varname,
625  cs_real_t conc0,
626  cs_real_t beta,
627  cs_real_t kp,
628  cs_real_t mliq,
629  cs_real_t t_eutec,
630  cs_real_t t_melt,
631  cs_real_t solute_diff,
632  cs_real_t latent_heat,
633  cs_real_t s_das);
634 
635 /*----------------------------------------------------------------------------*/
649 /*----------------------------------------------------------------------------*/
650 
651 void
653  int n_iter_max,
654  double tolerance,
655  double gliq_relax,
656  double eta_relax);
657 
658 /*----------------------------------------------------------------------------*/
676 /*----------------------------------------------------------------------------*/
677 
678 void
680  cs_solidification_func_t *cliq_update,
681  cs_solidification_func_t *gliq_update,
682  cs_solidification_func_t *thm_st_update,
683  cs_solidification_func_t *thm_conc_coupling);
684 
685 /*----------------------------------------------------------------------------*/
691 /*----------------------------------------------------------------------------*/
692 
695 
696 /*----------------------------------------------------------------------------*/
700 /*----------------------------------------------------------------------------*/
701 
702 void
704 
705 /*----------------------------------------------------------------------------*/
713 /*----------------------------------------------------------------------------*/
714 
715 void
717  const cs_cdo_quantities_t *quant);
718 
719 /*----------------------------------------------------------------------------*/
724 /*----------------------------------------------------------------------------*/
725 
726 void
728 
729 /*----------------------------------------------------------------------------*/
739 /*----------------------------------------------------------------------------*/
740 
741 void
743  const cs_cdo_connect_t *connect,
744  const cs_cdo_quantities_t *quant,
745  const cs_time_step_t *time_step);
746 
747 /*----------------------------------------------------------------------------*/
756 /*----------------------------------------------------------------------------*/
757 
758 void
760  const cs_time_step_t *time_step,
761  const cs_cdo_connect_t *connect,
762  const cs_cdo_quantities_t *quant);
763 
764 /*----------------------------------------------------------------------------*/
772 /*----------------------------------------------------------------------------*/
773 
774 void
776  const cs_cdo_quantities_t *quant,
777  const cs_time_step_t *ts);
778 
779 /*----------------------------------------------------------------------------*/
801 /*----------------------------------------------------------------------------*/
802 
803 void
804 cs_solidification_extra_post(void *input,
805  int mesh_id,
806  int cat_id,
807  int ent_flag[5],
808  cs_lnum_t n_cells,
809  cs_lnum_t n_i_faces,
810  cs_lnum_t n_b_faces,
811  const cs_lnum_t cell_ids[],
812  const cs_lnum_t i_face_ids[],
813  const cs_lnum_t b_face_ids[],
814  const cs_time_step_t *time_step);
815 
816 /*----------------------------------------------------------------------------*/
817 
819 
820 #endif /* __CS_SOLIDIFICATION_H__ */
void cs_solidification_compute(const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
Solve equations related to the solidification module.
Definition: cs_solidification.c:3467
cs_real_t ml
Definition: cs_solidification.h:328
cs_real_t latent_heat
Definition: cs_solidification.h:279
time step descriptor
Definition: cs_time_step.h:64
double delta_tolerance
Definition: cs_solidification.h:379
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:286
cs_real_t * ck_bulk
Definition: cs_solidification.h:396
Definition: cs_solidification.h:201
cs_real_t t_eut_inf
Definition: cs_solidification.h:317
const cs_real_t * temp_faces
Definition: cs_solidification.h:407
cs_real_t ref_concentration
Definition: cs_solidification.h:299
cs_property_t * g_l
Definition: cs_solidification.h:458
Definition: cs_solidification.h:204
cs_real_t * cliq_minus_cbulk
Definition: cs_solidification.h:426
cs_solidification_state_t
Kind of state in which a cell or an entity is.
Definition: cs_solidification.h:199
void cs_solidification_log_setup(void)
Summarize the solidification module in the log file dedicated to the setup.
Definition: cs_solidification.c:3167
cs_real_t * c_l_cells
Definition: cs_solidification.h:403
cs_navsto_param_coupling_t
Choice of algorithm for solving the system.
Definition: cs_navsto_param.h:447
cs_field_t * c_bulk
Definition: cs_solidification.h:352
cs_time_plot_t * plot_state
Definition: cs_solidification.h:464
cs_lnum_t first_cell
Definition: cs_solidification.h:505
double eta_relax
Definition: cs_solidification.h:380
Field descriptor.
Definition: cs_field.h:125
cs_solidification_func_t * update_thm_st
Definition: cs_solidification.h:341
Definition: cs_solidification.h:179
Definition: cs_solidification.h:220
cs_real_t * tk_bulk
Definition: cs_solidification.h:395
void * model_context
Definition: cs_solidification.h:484
cs_real_t t_melt
Definition: cs_solidification.h:310
cs_flag_t cs_solidification_model_t
Definition: cs_solidification.h:149
cs_solidification_func_t * update_clc
Definition: cs_solidification.h:338
cs_real_t t_eut_sup
Definition: cs_solidification.h:318
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
Definition: cs_solidification.h:185
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:217
cs_real_t inv_kpm1
Definition: cs_solidification.h:327
cs_real_t kp
Definition: cs_solidification.h:325
double precision, dimension(ncharm), save beta
Definition: cpincl.f90:99
cs_real_t c_eut
Definition: cs_solidification.h:320
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 momemtum equation.
Definition: cs_solidification.c:2433
Definition: cs_cdo_connect.h:76
cs_property_t * lam_viscosity
Definition: cs_solidification.h:451
bool cs_solidification_is_activated(void)
Test if solidification module is activated.
Definition: cs_solidification.c:2255
Structure storing information related to the "physical" boundaries associated with the computational ...
Definition: cs_boundary.h:151
cs_real_t * eta_coef_array
Definition: cs_solidification.h:416
cs_flag_t post_flag
Definition: cs_solidification.h:439
cs_real_t * thermal_source_term_array
Definition: cs_solidification.h:481
void cs_solidification_set_segregation_opt(cs_solidification_strategy_t strategy, int n_iter_max, double tolerance, double gliq_relax, double eta_relax)
Set the main numerical parameters which described a solidification process with a binary alloy (with ...
Definition: cs_solidification.c:2654
cs_real_t cs1
Definition: cs_solidification.h:321
double cs_real_t
Floating-point value.
Definition: cs_defs.h:307
Definition: cs_cdo_quantities.h:124
cs_solidification_func_t * update
Definition: cs_solidification.h:282
void cs_solidification_set_voller_model(cs_real_t t_solidus, cs_real_t t_liquidus, cs_real_t latent_heat, cs_real_t s_das)
Set the main physical parameters which described the Voller and Prakash modelling.
Definition: cs_solidification.c:2452
cs_real_t dgldC_eut
Definition: cs_solidification.h:322
struct _cs_time_plot_t cs_time_plot_t
Definition: cs_time_plot.h:48
cs_flag_t options
Definition: cs_solidification.h:437
cs_property_t * forcing_mom
Definition: cs_solidification.h:492
Definition: cs_solidification.h:190
Definition: cs_mesh.h:74
cs_real_t t_eut
Definition: cs_solidification.h:316
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.c:3676
cs_real_t t_solidus
Definition: cs_solidification.h:273
cs_solidification_func_t * update_velocity_forcing
Definition: cs_solidification.h:332
cs_real_t cp0
Definition: cs_solidification.h:448
cs_real_t * t_liquidus
Definition: cs_solidification.h:422
cs_real_t inv_kp
Definition: cs_solidification.h:326
cs_real_t * tbulk_minus_tliq
Definition: cs_solidification.h:425
cs_real_t s_das
Definition: cs_solidification.h:313
Definition: cs_solidification.h:219
int n_iter_max
Definition: cs_solidification.h:378
cs_equation_t * solute_equation
Definition: cs_solidification.h:351
cs_property_t * diff_pty
Definition: cs_solidification.h:412
cs_field_t * g_l_field
Definition: cs_solidification.h:456
cs_property_t * thermal_reaction_coef
Definition: cs_solidification.h:479
cs_real_t dilatation_coef
Definition: cs_solidification.h:298
Definition: cs_solidification.h:184
cs_real_t latent_heat
Definition: cs_solidification.h:304
cs_real_t inv_ml
Definition: cs_solidification.h:329
void cs_solidification_init_setup(void)
Setup equations/properties related to the Solidification module.
Definition: cs_solidification.c:2859
Definition: cs_solidification.h:191
cs_property_t * mass_density
Definition: cs_solidification.h:444
cs_real_t * c_l_faces
Definition: cs_solidification.h:404
int iter
Definition: cs_solidification.h:377
cs_real_t t_liquidus
Definition: cs_solidification.h:274
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:301
cs_real_t rho0
Definition: cs_solidification.h:445
cs_real_t * forcing_mom_array
Definition: cs_solidification.h:490
cs_real_t s_das
Definition: cs_solidification.h:263
cs_solidification_t * cs_solidification_get_structure(void)
Retrieve the main structure to deal with solidification process.
Definition: cs_solidification.c:2272
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.c:2974
Definition: cs_solidification.h:202
Definition: cs_solidification.h:291
#define END_C_DECLS
Definition: cs_defs.h:496
unsigned short int cs_flag_t
Definition: cs_defs.h:309
cs_real_t forcing_coef
Definition: cs_solidification.h:501
cs_real_t diff_coef
Definition: cs_solidification.h:411
Definition: cs_solidification.h:223
void cs_solidification_initialize(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step)
Initialize the context structure used to build the algebraic system This is done after the setup step...
Definition: cs_solidification.c:3322
cs_solidification_t * cs_solidification_destroy_all(void)
Free the main structure related to the solidification module.
Definition: cs_solidification.c:2787
cs_real_t * tx_bulk
Definition: cs_solidification.h:397
cs_real_t * cx_bulk
Definition: cs_solidification.h:398
Definition: cs_solidification.h:434
void cs_solidification_set_verbosity(int verbosity)
Set the level of verbosity for the solidification module.
Definition: cs_solidification.c:2286
cs_real_t * diff_pty_array
Definition: cs_solidification.h:413
Definition: cs_solidification.h:221
cs_solidification_model_bit_t
Bit values for physical modelling related to the Navier-Stokes system of equations.
Definition: cs_solidification.h:173
cs_field_t * temperature
Definition: cs_solidification.h:476
Definition: cs_thermal_system.h:145
double gliq_relax
Definition: cs_solidification.h:381
cs_solidification_func_t * update_gl
Definition: cs_solidification.h:335
Main structure to handle the discretization and the resolution of an equation.
int verbosity
Definition: cs_solidification.h:441
cs_real_t * thermal_reaction_coef_array
Definition: cs_solidification.h:480
Definition: cs_solidification.h:260
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_coupling_t algo_coupling, cs_flag_t ns_option, cs_flag_t ns_post_flag)
Activate the solidification module.
Definition: cs_solidification.c:2312
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:241
Definition: cs_solidification.h:203
cs_solidification_state_t * cell_state
Definition: cs_solidification.h:461
cs_solidification_strategy_t strategy
Definition: cs_solidification.h:382
cs_flag_t model
Definition: cs_solidification.h:436
Definition: cs_solidification.h:178
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.c:3520
Structure associated to the definition of a property relying on the cs_xdef_t structure.
cs_thermal_system_t * thermal_sys
Definition: cs_solidification.h:473
cs_solidification_func_t * thermosolutal_coupling
Definition: cs_solidification.h:346
void cs_solidification_set_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, cs_solidification_func_t *thm_conc_coupling)
Set the functions to perform the update of physical properties and/or the computation of the thermal ...
Definition: cs_solidification.c:2737
Definition: mesh.f90:26
Definition: cs_solidification.h:206
void cs_solidification_set_binary_alloy_model(const char *name, const char *varname, cs_real_t conc0, cs_real_t beta, 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, cs_real_t s_das)
Set the main physical parameters which described a solidification process with a binary alloy (with c...
Definition: cs_solidification.c:2512
cs_property_t * eta_coef_pty
Definition: cs_solidification.h:415