My Project
programmer's documentation
Functions
cs_gwf_physical_properties.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "bft_mem.h"
#include "bft_error.h"
#include "bft_printf.h"
#include "cs_gwf_parameters.h"
#include "cs_math.h"
#include "cs_field.h"
#include "cs_field_pointer.h"
#include "cs_mesh.h"
#include "cs_mesh_quantities.h"
#include "cs_gwf_physical_properties.h"
Include dependency graph for cs_gwf_physical_properties.c:

Functions

void cs_gwf_delay_update (void)
 Update delay of all transported species (user scalars) More...
 
void cs_gwf_decay_rate (const int f_id, cs_real_t *ts_imp)
 Add first-order decay to implicit part of source term array. More...
 
void cs_gwf_sorbed_concentration_update (const int f_id)
 Update sorbed concentration for scalars with kinetic sorption. More...
 
void cs_gwf_precipitation (const int f_id)
 Update liquid concentration according to precipitation phenomenon. More...
 
void cs_gwf_kinetic_reaction (const int f_id, cs_real_t *ts_imp, cs_real_t *ts_exp)
 Take into account kinetic chemical reaction in evolution equation of total liquid concentration. More...
 

Function Documentation

◆ cs_gwf_decay_rate()

void cs_gwf_decay_rate ( const int  f_id,
cs_real_t ts_imp 
)

Add first-order decay to implicit part of source term array.

Corresponding EDO for decay phenomenon is:

\[ \dfrac{dc}{dt} = - decay_rate c \]

Parameters
[in]f_idfield index of scalar on which decay is set
[in,out]ts_impsource term implicit part for scalar of index f_id

◆ cs_gwf_delay_update()

void cs_gwf_delay_update ( void  )

Update delay of all transported species (user scalars)

Species transport is delayed by retention in solid phase. This delay is computed as follows:

\[ R = 1 + \rho \dfrac{K_d}{\theta} ; \]

where $ R $ is the delay factor, $ \rho $ the soil (bulk) density, $ K_d $ the contaminant distribution coefficient and $ \theta $ the moisture content.

Please refer to the dedicated section of the theory guide for more informations.

◆ cs_gwf_kinetic_reaction()

void cs_gwf_kinetic_reaction ( const int  f_id,
cs_real_t ts_imp,
cs_real_t ts_exp 
)

Take into account kinetic chemical reaction in evolution equation of total liquid concentration.

\[ S^{n+1} = S^n \exp(- (k^{-} + decay_rate) * \Delta t) - C^n \dfrac{k^{+}}{k^{-}} \left(\exp(- (k^{-} + decay_rate) * \Delta t) - 1 \right) \]

Parameters
[in]f_idfield index of scalar which properties are updated

◆ cs_gwf_precipitation()

void cs_gwf_precipitation ( const int  f_id)

Update liquid concentration according to precipitation phenomenon.

If liquid concentration exceeds solubility index, then it is clipped and transferred in precipitated concentration.

Note that the decay rate is applied before the clipping.

Parameters
[in]f_idfield index of scalar which properties are updated

◆ cs_gwf_sorbed_concentration_update()

void cs_gwf_sorbed_concentration_update ( const int  f_id)

Update sorbed concentration for scalars with kinetic sorption.

It is estimated by the following analytical expression :

\[ S^{n+1} = S^n \exp(- (k^{-} + decay_rate) * \Delta t) - C^n \dfrac{k^{+}}{k^{-}} \left(\exp(- (k^{-} + decay_rate) * \Delta t) - 1 \right) \]

Parameters
[in]f_idfield index of scalar which properties are updated