7.0
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-2021 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  * The following flags are set when calling \ref cs_solidification_set_functions
136  *
137  * \def CS_SOLIDIFICATION_BINARY_ALLOY_M_FUNC
138  * \brief the update of the forcing term (penalization) in the momentum equation
139  * is defined using a user function
140  *
141  * \def CS_SOLIDIFICATION_BINARY_ALLOY_C_FUNC
142  * \brief the update of the liquid concentration of the binary alloy is defined
143  * using a user function
144  *
145  * \def CS_SOLIDIFICATION_BINARY_ALLOY_G_FUNC
146  * \brief the update of the liquid fraction is defined using a user function
147  *
148  * \def CS_SOLIDIFICATION_BINARY_ALLOY_T_FUNC
149  * \brief the update of the thermal source term is defined using a user function
150  *
151  * \def CS_SOLIDIFICATION_BINARY_ALLOY_TCC_FUNC
152  * \brief the main algorithm for the thermo-solutal coupling is defined by a
153  * 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 #define CS_SOLIDIFICATION_BINARY_ALLOY_TCC_FUNC (1 <<11) /*= 2048 */
160 
165 /*=============================================================================
166  * Structure and type definitions
167  *============================================================================*/
168 
170 
197 typedef enum {
198 
199  /* Main modelling for the thermal system
200  ------------------------------------- */
201 
204 
205  /* Solidification modelling
206  ------------------------ */
207 
210 
212 
217 typedef enum {
218 
223 
225 
227 
235 typedef enum {
236 
240 
242 
244 
245 /*----------------------------------------------------------------------------*/
256 /*----------------------------------------------------------------------------*/
257 
258 typedef void
260  const cs_cdo_connect_t *connect,
261  const cs_cdo_quantities_t *quant,
262  const cs_time_step_t *ts);
263 
264 /* Structure storing physical parameters related to a choice of solidification
265  modelling */
266 
267 /* Voller and Prakash model "A fixed grid numerical modelling methodology for
268  * convection-diffusion mushy region phase-change problems" Int. J. Heat
269  * Transfer, 30 (8), 1987.
270  * No tracer. Only physical constants describing the solidification process are
271  * used.
272  */
273 
274 /*----------------------------------------------------------------------------
275  * Solidification without segregation (Voller & Prakash'87 model)
276  *----------------------------------------------------------------------------*/
277 
278 typedef struct {
279 
280  /* Secondary dendrite arm spacing */
282 
283  /* Physical parameters to specify the law of variation of the liquid fraction
284  * with respect to the temperature
285  *
286  * gl(T) = 1 if T > t_liquidus and gl(T) = 0 if T < t_solidus
287  * Otherwise:
288  * gl(T) = (T - t_solidus)/(t_liquidus - t_solidus)
289  */
290 
293 
294  /* Physical parameter for computing the source term in the energy equation
295  * Latent heat between the liquid and solid phase
296  */
298 
299  /* Function pointer related to the way of updating the model */
301 
303 
304 
305 /*----------------------------------------------------------------------------
306  * Solidification of a binary alloy with segregation (Voller & Prakash'89 model)
307  *----------------------------------------------------------------------------*/
308 
309 typedef struct {
310 
311  /* Parameters for the Boussinesq approximation in the momentum equation
312  * related to solute concentration:
313  * solutal dilatation/expansion coefficient and the reference mixture
314  * concentration for the binary alloy
315  */
318 
319  /* Physical parameter for computing the source term in the energy equation
320  * Latent heat between the liquid and solid phase
321  */
323 
324  /* Phase diagram features for an alloy with the component A and B */
325  /* -------------------------------------------------------------- */
326 
327  /* Temperature of phase change for the pure material (conc = 0) */
329 
330  /* Secondary dendrite arm spacing */
332 
333  /* Eutectic point: temperature and concentration */
337 
341 
342  /* Physical parameters */
343  cs_real_t kp; /* distribution coefficient */
344  cs_real_t inv_kp; /* reciprocal of kp */
345  cs_real_t inv_kpm1; /* 1/(kp - 1) */
346  cs_real_t ml; /* Liquidus slope \frac{\partial g_l}{\partial C} */
347  cs_real_t inv_ml; /* reciprocal of ml */
348 
349  /* Function to update the velocity forcing in the momentum equation */
351 
352  /* Function to update the liquid fraction */
354 
355  /* Function to update c_l in each cell */
357 
358  /* Function to update the source term for the thermal equation */
360 
361  /* Function to compute the thermo-solutal coupling (previous function pointers
362  are called inside this function by default but a user can defined whatever
363  is needed inside */
365 
366  /* Alloy features */
367  /* -------------- */
368 
371 
372  /* The variable related to this equation in the solute concentration of
373  * the mixture: c_bulk (c_s in the solid phase and c_l in the liquid phase)
374  * c_bulk = gs*c_s + gl*c_l where gs + gl = 1
375  * gl is the liquid fraction and gs the solid fraction
376  * c_s = kp * c_l (lever rule is assumed up to now)
377  *
378  * --> c_bulk = (gs*kp + gl)*c_l
379  */
380 
381  /* Drive the convergence of the coupled system (solute transport and thermal
382  * equation) with respect to the following criteria (taken from Voller and
383  * Swaminathan'91)
384  * max_{c\in C} |Temp^(k+1) - Temp^(k)| < delta_tolerance
385  * max_{c\in C} |Cbulk^(k+1) - Cbulk*^(k)| < delta_tolerance
386  * n_iter < n_iter_max
387  *
388  * eta_relax: add a relaxation in the update of the eta coefficient
389  * conc_liq = eta_coef * conc_bulk
390  * eta_relax = 0. --> No relaxation (default choice)
391  *
392  * gliq_relax: idem but for the liquid fraction
393  */
394 
395  int iter;
398  double eta_relax;
399  double gliq_relax;
401 
402  /* During the non-linear iteration process one needs:
403  * temp_{n} --> stored in field->val_pre
404  * temp_{n+1}^k --> stored in tk_bulk (in this structure)
405  * temp_{n+1}^{k+1} --> stored in field->val
406  *
407  * Optionally one may consider an extrapolated temperature and bulk
408  * concentration
409  * temp_{n+1}^{extrap} = 2*temp_{n} - temp_{n-1}
410  *
411  * Same thing for the bulk concentration.
412  */
417 
418  /* Solute concentration in the liquid phase
419  * 1) array of the last computed values at cells
420  * 2) array of the last computed values at faces (interior and border) */
423 
424  /* Temperature values at faces (this is not owned by the structure) */
426 
427  /* Diffusion coefficient for the solute in the liquid phase
428  * diff_pty_val = rho * g_l * diff_coef */
432 
435 
436  /* Optional postprocessing arrays */
437  /* ------------------------------ */
438 
439  /* Liquidus temperature (values at cell centers) */
441 
442  /* Quantities for advanced analysis */
445 
447 
448 /*----------------------------------------------------------------------------
449  * Main structure to manage the solidification process
450  *----------------------------------------------------------------------------*/
451 
452 typedef struct {
453 
454  cs_flag_t model; /* Modelling for the solidifcation module */
455  cs_flag_t options; /* Flag dedicated to general options to handle
456  * the solidification module*/
457  cs_flag_t post_flag; /* Flag dedicated to the post-processing
458  * of the solidifcation module */
459  int verbosity; /* Level of verbosity */
460 
461  /* Mass density of the liquid/solid media */
464 
465  /* Reference value for the heat capacity in the solidification/melting area
466  * (assumed to be uniform) */
468 
469  /* Viscosity (pointer to the total viscosity which should be equal to the
470  * laminar viscosity since no turbulence modelling is usually taken into
471  * account */
473 
474  /* Liquid fraction of the mixture */
475  /* ------------------------------ */
476 
477  cs_field_t *g_l_field; /* field storing the values of the liquid
478  fraction at each cell */
479  cs_property_t *g_l; /* liquid fraction property */
480 
481  /* array storing the state (solid, mushy, liquid) for each cell */
483 
484  /* Plot evolution of the solidification process */
486 
487  /* Monitoring related to this module */
490 
491  /* Quantities related to the energy equation */
492  /* ----------------------------------------- */
493 
495 
496  /* Fields associated to this module */
498 
499  /* A reaction term and source term are introduced in the thermal model */
503 
504  /* Additional settings related to the choice of solidification modelling */
506 
507  /* A reaction term is introduced in the momentum equation. This terms tends to
508  * a huge number when the liquid fraction tends to 0 in order to penalize
509  * the velocity to zero when the whole cell is solid
510  */
511  cs_real_t *forcing_mom_array; /* values of the forcing reaction
512  coefficient in each cell */
514 
515  /* Porous media like reaction term in the momentum equation:
516  *
517  * forcing_coef = 180 * visco0 / s_das^2
518  * where visco0 is the laminar viscosity and s_das is the secondary
519  * dendrite arm spacing
520  * F(u) = forcing_coef * (1- gl)^2/(gl^3 + forcing_eps) * u
521  */
523 
524  /* First cell associated to a fluid/solid area (i.e. not associated to
525  * a permanent solid zone) */
527 
529 
530 /*============================================================================
531  * Public function prototypes
532  *============================================================================*/
533 
534 /*----------------------------------------------------------------------------*/
538 /*----------------------------------------------------------------------------*/
539 
540 bool
542 
543 /*----------------------------------------------------------------------------*/
549 /*----------------------------------------------------------------------------*/
550 
553 
554 /*----------------------------------------------------------------------------*/
560 /*----------------------------------------------------------------------------*/
561 
562 void
563 cs_solidification_set_verbosity(int verbosity);
564 
565 /*----------------------------------------------------------------------------*/
580 /*----------------------------------------------------------------------------*/
581 
584  cs_flag_t options,
585  cs_flag_t post_flag,
586  const cs_boundary_t *boundaries,
587  cs_navsto_param_model_t ns_model,
588  cs_navsto_param_model_flag_t ns_model_flag,
589  cs_navsto_param_coupling_t algo_coupling,
590  cs_navsto_param_post_flag_t ns_post_flag);
591 
592 /*----------------------------------------------------------------------------*/
600 /*----------------------------------------------------------------------------*/
601 
602 void
604 
605 /*----------------------------------------------------------------------------*/
615 /*----------------------------------------------------------------------------*/
616 
617 void
619  cs_real_t t_liquidus,
620  cs_real_t latent_heat,
621  cs_real_t s_das);
622 
623 /*----------------------------------------------------------------------------*/
643 /*----------------------------------------------------------------------------*/
644 
645 void
647  const char *varname,
648  cs_real_t conc0,
649  cs_real_t beta,
650  cs_real_t kp,
651  cs_real_t mliq,
652  cs_real_t t_eutec,
653  cs_real_t t_melt,
654  cs_real_t solute_diff,
655  cs_real_t latent_heat,
656  cs_real_t s_das);
657 
658 /*----------------------------------------------------------------------------*/
672 /*----------------------------------------------------------------------------*/
673 
674 void
676  int n_iter_max,
677  double tolerance,
678  double gliq_relax,
679  double eta_relax);
680 
681 /*----------------------------------------------------------------------------*/
699 /*----------------------------------------------------------------------------*/
700 
701 void
703  cs_solidification_func_t *cliq_update,
704  cs_solidification_func_t *gliq_update,
705  cs_solidification_func_t *thm_st_update,
706  cs_solidification_func_t *thm_conc_coupling);
707 
708 /*----------------------------------------------------------------------------*/
714 /*----------------------------------------------------------------------------*/
715 
718 
719 /*----------------------------------------------------------------------------*/
723 /*----------------------------------------------------------------------------*/
724 
725 void
727 
728 /*----------------------------------------------------------------------------*/
736 /*----------------------------------------------------------------------------*/
737 
738 void
740  const cs_cdo_quantities_t *quant);
741 
742 /*----------------------------------------------------------------------------*/
747 /*----------------------------------------------------------------------------*/
748 
749 void
751 
752 /*----------------------------------------------------------------------------*/
762 /*----------------------------------------------------------------------------*/
763 
764 void
766  const cs_cdo_connect_t *connect,
767  const cs_cdo_quantities_t *quant,
768  const cs_time_step_t *time_step);
769 
770 /*----------------------------------------------------------------------------*/
779 /*----------------------------------------------------------------------------*/
780 
781 void
783  const cs_time_step_t *time_step,
784  const cs_cdo_connect_t *connect,
785  const cs_cdo_quantities_t *quant);
786 
787 /*----------------------------------------------------------------------------*/
795 /*----------------------------------------------------------------------------*/
796 
797 void
799  const cs_cdo_quantities_t *quant,
800  const cs_time_step_t *ts);
801 
802 /*----------------------------------------------------------------------------*/
824 /*----------------------------------------------------------------------------*/
825 
826 void
827 cs_solidification_extra_post(void *input,
828  int mesh_id,
829  int cat_id,
830  int ent_flag[5],
831  cs_lnum_t n_cells,
832  cs_lnum_t n_i_faces,
833  cs_lnum_t n_b_faces,
834  const cs_lnum_t cell_ids[],
835  const cs_lnum_t i_face_ids[],
836  const cs_lnum_t b_face_ids[],
837  const cs_time_step_t *time_step);
838 
839 /*----------------------------------------------------------------------------*/
840 
842 
843 #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:3459
cs_real_t ml
Definition: cs_solidification.h:346
cs_real_t latent_heat
Definition: cs_solidification.h:297
time step descriptor
Definition: cs_time_step.h:64
double delta_tolerance
Definition: cs_solidification.h:397
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:286
cs_real_t * ck_bulk
Definition: cs_solidification.h:414
Definition: cs_solidification.h:219
cs_real_t t_eut_inf
Definition: cs_solidification.h:335
const cs_real_t * temp_faces
Definition: cs_solidification.h:425
cs_real_t ref_concentration
Definition: cs_solidification.h:317
cs_property_t * g_l
Definition: cs_solidification.h:479
Definition: cs_solidification.h:222
cs_real_t * cliq_minus_cbulk
Definition: cs_solidification.h:444
cs_solidification_state_t
Kind of state in which a cell or an entity is.
Definition: cs_solidification.h:217
void cs_solidification_log_setup(void)
Summarize the solidification module in the log file dedicated to the setup.
Definition: cs_solidification.c:3165
cs_real_t * c_l_cells
Definition: cs_solidification.h:421
cs_navsto_param_coupling_t
Choice of algorithm for solving the system.
Definition: cs_navsto_param.h:525
cs_field_t * c_bulk
Definition: cs_solidification.h:370
cs_time_plot_t * plot_state
Definition: cs_solidification.h:485
cs_lnum_t first_cell
Definition: cs_solidification.h:526
double eta_relax
Definition: cs_solidification.h:398
Field descriptor.
Definition: cs_field.h:125
cs_solidification_func_t * update_thm_st
Definition: cs_solidification.h:359
Definition: cs_solidification.h:238
cs_real_t * tk_bulk
Definition: cs_solidification.h:413
void * model_context
Definition: cs_solidification.h:505
cs_real_t t_melt
Definition: cs_solidification.h:328
cs_flag_t cs_solidification_model_t
Definition: cs_solidification.h:169
cs_solidification_func_t * update_clc
Definition: cs_solidification.h:356
cs_real_t t_eut_sup
Definition: cs_solidification.h:336
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
cs_property_t * viscosity
Definition: cs_solidification.h:472
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:235
cs_real_t inv_kpm1
Definition: cs_solidification.h:345
cs_real_t kp
Definition: cs_solidification.h:343
double precision, dimension(ncharm), save beta
Definition: cpincl.f90:99
cs_real_t c_eut
Definition: cs_solidification.h:338
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:2431
cs_flag_t cs_navsto_param_post_flag_t
Definition: cs_navsto_param.h:58
Definition: cs_cdo_connect.h:76
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:155
cs_real_t * eta_coef_array
Definition: cs_solidification.h:434
cs_flag_t post_flag
Definition: cs_solidification.h:457
cs_real_t * thermal_source_term_array
Definition: cs_solidification.h:502
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:2652
cs_real_t cs1
Definition: cs_solidification.h:339
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:300
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:2450
cs_real_t dgldC_eut
Definition: cs_solidification.h:340
struct _cs_time_plot_t cs_time_plot_t
Definition: cs_time_plot.h:48
cs_flag_t options
Definition: cs_solidification.h:455
cs_property_t * forcing_mom
Definition: cs_solidification.h:513
Definition: cs_solidification.h:208
Definition: cs_mesh.h:84
Definition: cs_solidification.h:202
cs_real_t t_eut
Definition: cs_solidification.h:334
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:3669
cs_real_t t_solidus
Definition: cs_solidification.h:291
cs_solidification_func_t * update_velocity_forcing
Definition: cs_solidification.h:350
cs_real_t cp0
Definition: cs_solidification.h:467
cs_real_t * t_liquidus
Definition: cs_solidification.h:440
cs_real_t inv_kp
Definition: cs_solidification.h:344
cs_real_t * tbulk_minus_tliq
Definition: cs_solidification.h:443
cs_real_t s_das
Definition: cs_solidification.h:331
Definition: cs_solidification.h:237
int n_iter_max
Definition: cs_solidification.h:396
Definition: cs_solidification.h:203
cs_equation_t * solute_equation
Definition: cs_solidification.h:369
cs_property_t * diff_pty
Definition: cs_solidification.h:430
cs_field_t * g_l_field
Definition: cs_solidification.h:477
cs_property_t * thermal_reaction_coef
Definition: cs_solidification.h:500
cs_real_t dilatation_coef
Definition: cs_solidification.h:316
cs_real_t latent_heat
Definition: cs_solidification.h:322
cs_real_t inv_ml
Definition: cs_solidification.h:347
void cs_solidification_init_setup(void)
Setup equations/properties related to the Solidification module.
Definition: cs_solidification.c:2857
Definition: cs_solidification.h:209
cs_property_t * mass_density
Definition: cs_solidification.h:462
cs_real_t * c_l_faces
Definition: cs_solidification.h:422
int iter
Definition: cs_solidification.h:395
cs_real_t t_liquidus
Definition: cs_solidification.h:292
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:301
cs_real_t rho0
Definition: cs_solidification.h:463
cs_real_t * forcing_mom_array
Definition: cs_solidification.h:511
cs_real_t s_das
Definition: cs_solidification.h:281
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:2972
Definition: cs_solidification.h:220
Definition: cs_solidification.h:309
#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:522
cs_real_t diff_coef
Definition: cs_solidification.h:429
Definition: cs_solidification.h:241
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:3314
cs_solidification_t * cs_solidification_destroy_all(void)
Free the main structure related to the solidification module.
Definition: cs_solidification.c:2785
cs_real_t * tx_bulk
Definition: cs_solidification.h:415
cs_real_t * cx_bulk
Definition: cs_solidification.h:416
Definition: cs_solidification.h:452
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:431
Definition: cs_solidification.h:239
cs_solidification_model_bit_t
Bit values for physical modelling related to the Navier-Stokes system of equations.
Definition: cs_solidification.h:197
cs_field_t * temperature
Definition: cs_solidification.h:497
Definition: cs_thermal_system.h:145
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.c:2313
double gliq_relax
Definition: cs_solidification.h:399
cs_solidification_func_t * update_gl
Definition: cs_solidification.h:353
Main structure to handle the discretization and the resolution of an equation.
int verbosity
Definition: cs_solidification.h:459
cs_navsto_param_model_t
Describe the system of equations related to the Navier-Stokes to be solved.
Definition: cs_navsto_param.h:81
cs_real_t * thermal_reaction_coef_array
Definition: cs_solidification.h:501
Definition: cs_solidification.h:278
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:259
Definition: cs_solidification.h:221
cs_solidification_state_t * cell_state
Definition: cs_solidification.h:482
cs_solidification_strategy_t strategy
Definition: cs_solidification.h:400
cs_flag_t model
Definition: cs_solidification.h:454
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:3512
Structure associated to the definition of a property relying on the cs_xdef_t structure.
cs_flag_t cs_navsto_param_model_flag_t
Definition: cs_navsto_param.h:57
cs_thermal_system_t * thermal_sys
Definition: cs_solidification.h:494
cs_solidification_func_t * thermosolutal_coupling
Definition: cs_solidification.h:364
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:2735
Definition: mesh.f90:26
Definition: cs_solidification.h:224
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:2510
cs_property_t * eta_coef_pty
Definition: cs_solidification.h:433