1 #ifndef __CS_GWF_TRACER_H__
2 #define __CS_GWF_TRACER_H__
425 const char *var_name,
471 const char *soil_name,
475 double distrib_coef);
492 const char *soil_name,
698 const char *chain_name,
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:515
@ lambda
Definition: cs_field_pointer.h:106
cs_flag_t cs_gwf_tracer_model_t
Definition: cs_gwf_param.h:296
cs_gwf_model_type_t
Type of system of equation(s) to consider for the physical modelling.
Definition: cs_gwf_param.h:126
cs_gwf_tracer_unit_t
Type of unit for the expression of the radioactive inventory.
Definition: cs_gwf_param.h:110
cs_gwf_tracer_decay_chain_t * cs_gwf_tracer_decay_chain_by_id(int id)
Retrieve the decay chain structure associated to the given id If not found, it returns the NULL point...
Definition: cs_gwf_tracer.c:3251
void cs_gwf_tracer_compute_all(const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq)
Compute the new (unsteady) state for all tracer equations. Nothing is done if all equations are stead...
Definition: cs_gwf_tracer.c:2620
cs_equation_param_t * cs_gwf_tracer_decay_chain_get_equation_param(cs_gwf_tracer_decay_chain_t *tdc, int id)
Retrieve the equation parameters for the tracer at the position "id" in the decay chain structure....
Definition: cs_gwf_tracer.c:3375
cs_gwf_tracer_t * cs_gwf_tracer_decay_chain_get_tracer(cs_gwf_tracer_decay_chain_t *tdc, int id)
Retrieve the tracer structure for the tracer at the position "id" in the decay chain structure....
Definition: cs_gwf_tracer.c:3314
void cs_gwf_tracer_compute_steady_all(const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq)
Compute the steady-state for all tracer equations. Nothing is done if all equations are unsteady.
Definition: cs_gwf_tracer.c:2571
void cs_gwf_tracer_unsat_finalize_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_adv_field_t *adv, cs_gwf_tracer_t *tracer)
Set the parameters related to a standard tracer equation in case of an unsaturated flow model.
Definition: cs_gwf_tracer.c:2977
void cs_gwf_tracer_free_all(void)
Free all tracer structures and all decay chains.
Definition: cs_gwf_tracer.c:2140
void cs_gwf_tracer_finalize_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
Finalize the tracer setup.
Definition: cs_gwf_tracer.c:2374
void() cs_gwf_tracer_init_setup_t(cs_gwf_tracer_t *tracer)
Generic function to update the first setup stage (the one done before building mesh and its related q...
Definition: cs_gwf_tracer.h:77
void() cs_gwf_tracer_integrate_t(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_equation_t *eq, const cs_zone_t *zone, void *context, double results[])
Compute the quantity of tracer using an integral of the tracer concentration over a given set of cell...
Definition: cs_gwf_tracer.h:149
cs_equation_t * cs_gwf_tracer_decay_chain_get_equation(cs_gwf_tracer_decay_chain_t *tdc, int id)
Retrieve the equation structure for the tracer at the position "id" in the decay chain structure....
Definition: cs_gwf_tracer.c:3345
void cs_gwf_tracer_update_diff_pty(const cs_time_step_t *ts, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
Update the diffusion property related to each tracer equation The update strategy depends on the soil...
Definition: cs_gwf_tracer.c:2460
double cs_gwf_tracer_integrate(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_gwf_tracer_t *tracer, const char *z_name)
Compute the integral of the tracer concentration over a given set of cells. This integral gives the n...
Definition: cs_gwf_tracer.c:3106
void() cs_gwf_tracer_update_t(cs_gwf_tracer_t *tracer, void *context, const cs_time_step_t *ts, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
Generic function to update the properties related to a tracer. This function depends on a numerical s...
Definition: cs_gwf_tracer.h:113
cs_gwf_tracer_decay_chain_t * cs_gwf_tracer_create_decay_chain(int n_tracers, const char *chain_name, cs_gwf_tracer_unit_t unit)
Create a decay chain structure to manage several linked tracers.
Definition: cs_gwf_tracer.c:3200
cs_gwf_tracer_decay_chain_t * cs_gwf_tracer_decay_chain_by_name(const char *chain_name)
Retrieve the decay chain structure associated to the name given as parameter. If not found,...
Definition: cs_gwf_tracer.c:3275
cs_gwf_tracer_t * cs_gwf_tracer_add(cs_gwf_tracer_model_t tr_model, cs_gwf_model_type_t gwf_model, const char *eq_name, const char *var_name, cs_adv_field_t *adv_field, double lambda, int chain_position, int chain_id, cs_gwf_tracer_init_setup_t *init_setup, cs_gwf_tracer_finalize_setup_t *finalize_setup)
Create a new cs_gwf_tracer_t structure and initialize its members. This creation of a new tracer is f...
Definition: cs_gwf_tracer.c:2084
void cs_gwf_tracer_default_init_setup(cs_gwf_tracer_t *tracer)
Add terms to the algebraic system related to a tracer equation according to the settings....
Definition: cs_gwf_tracer.c:2675
cs_real_t cs_gwf_tracer_get_time_theta_max(void)
Retrieve the max. value of the theta parameter associated to a time scheme. Loop on all tracer equati...
Definition: cs_gwf_tracer.c:2191
void cs_gwf_tracer_sat_finalize_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_adv_field_t *adv, cs_gwf_tracer_t *tracer)
Set the parameters related to a standard tracer equation case of a fully saturated flow model.
Definition: cs_gwf_tracer.c:2837
void cs_gwf_tracer_log_all(void)
Display the main features related to each tracer.
Definition: cs_gwf_tracer.c:2492
void cs_gwf_tracer_init_setup(void)
Initial setup step for tracer equations. Soils and equation parameters are defined at this stage....
Definition: cs_gwf_tracer.c:2337
void cs_gwf_tracer_integrate_by_terms(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_gwf_tracer_t *tracer, const char *z_name, double results[])
Compute the quantity of tracer using the integral of the tracer concentration over a given set of cel...
Definition: cs_gwf_tracer.c:3156
void() cs_gwf_tracer_finalize_setup_t(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_adv_field_t *adv, cs_gwf_tracer_t *tracer)
Generic function to finalize the setup of parameters related to a tracer equation....
Definition: cs_gwf_tracer.h:93
void() cs_gwf_tracer_free_context_t(cs_gwf_tracer_t *tracer)
Generic function to free the input of a tracer model.
Definition: cs_gwf_tracer.h:129
void cs_gwf_tracer_set_precip_param(cs_gwf_tracer_t *tracer, const char *soil_name, double conc_l_star)
For a specified soil set the parameters corresponding to a precipitation modelling of a tracer transp...
Definition: cs_gwf_tracer.c:2293
void cs_gwf_tracer_set_soil_param(cs_gwf_tracer_t *tracer, const char *soil_name, double wmd, double alpha_l, double alpha_t, double distrib_coef)
Set the main parameters corresponding to a default modelling of a tracer transport equation for a spe...
Definition: cs_gwf_tracer.c:2230
cs_gwf_tracer_t * cs_gwf_tracer_by_name(const char *eq_name)
Retrieve the pointer to the cs_gwf_tracer_t structure associated to the name given as parameter.
Definition: cs_gwf_tracer.c:2031
Definition: cs_gwf_tracer.h:184
cs_real_t * precip_mass
Definition: cs_gwf_tracer.h:218
double * kd0
Definition: cs_gwf_tracer.h:198
double decay_coef
Definition: cs_gwf_tracer.h:189
double * rho_bulk
Definition: cs_gwf_tracer.h:197
double * conc_l_star
Definition: cs_gwf_tracer.h:210
cs_real_t * conc_site2
Definition: cs_gwf_tracer.h:237
cs_field_t * precip_field
Definition: cs_gwf_tracer.h:224
double * k0_plus
Definition: cs_gwf_tracer.h:232
double * alpha_t
Definition: cs_gwf_tracer.h:203
double * k0_minus
Definition: cs_gwf_tracer.h:234
const cs_field_t * darcy_velocity_field
Definition: cs_gwf_tracer.h:242
double * rho_kd
Definition: cs_gwf_tracer.h:200
double * wmd
Definition: cs_gwf_tracer.h:205
double * alpha_l
Definition: cs_gwf_tracer.h:202
Definition: cs_gwf_tracer.h:249
cs_gwf_tracer_integrate_t * integrate
Definition: cs_gwf_tracer.h:364
void * context
Definition: cs_gwf_tracer.h:302
int chain_id
Definition: cs_gwf_tracer.h:317
cs_gwf_tracer_model_t model
Definition: cs_gwf_tracer.h:268
int reaction_id
Definition: cs_gwf_tracer.h:283
cs_gwf_tracer_init_setup_t * init_setup
Definition: cs_gwf_tracer.h:366
cs_gwf_tracer_free_context_t * free_context
Definition: cs_gwf_tracer.h:368
cs_gwf_tracer_finalize_setup_t * finalize_setup
Definition: cs_gwf_tracer.h:367
cs_equation_t * equation
Definition: cs_gwf_tracer.h:295
cs_gwf_tracer_update_t * update_decay_chain_st
Definition: cs_gwf_tracer.h:362
int chain_position_id
Definition: cs_gwf_tracer.h:310
cs_gwf_model_type_t hydraulic_model
Definition: cs_gwf_tracer.h:261
cs_gwf_tracer_update_t * update_precipitation
Definition: cs_gwf_tracer.h:361
cs_field_t * diffusivity
Definition: cs_gwf_tracer.h:275
cs_gwf_tracer_update_t * update_diff_pty
Definition: cs_gwf_tracer.h:360
Definition: cs_advection_field.h:150
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:137
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:192
Main structure to handle the discretization and the resolution of an equation.
Field descriptor.
Definition: cs_field.h:131
Definition: cs_gwf_tracer.h:162
char * name
Definition: cs_gwf_tracer.h:164
cs_xdef_t ** st_defs
Definition: cs_gwf_tracer.h:177
int id
Definition: cs_gwf_tracer.h:165
cs_gwf_tracer_t ** tracers
Definition: cs_gwf_tracer.h:173
int n_tracers
Definition: cs_gwf_tracer.h:167
cs_gwf_tracer_unit_t unit
Definition: cs_gwf_tracer.h:168
Set of parameters describing a tracer structure.
time step descriptor
Definition: cs_time_step.h:64
Structure storing medata for defining a quantity in a very flexible way.
Definition: cs_xdef.h:160