Introduction
User subroutine for the atmospheric model.
Atmospheric module
imode
corresponds to the number of calls of the usatdv function. Depending on the value of imode
, different operations are performed in the following example.
imode = 0
imode = 1
Data Entry for the atmospheric soil model
To activate the model, the user has to set the and to specify the zone id on which the soil model is applied in cs_user_parameters.c, routine cs_user_model:
at_opt->soil_model = 1;
@ CS_ATMO_SOIL_5_CAT
Definition: cs_atmo.h:106
const cs_zone_t * cs_boundary_zone_by_name(const char *name)
Return a pointer to a boundary zone based on its name if present.
Definition: cs_boundary_zone.c:711
int id
Definition: cs_zone.h:59
Then the user may change default coefficient values for soil categories in cs_user_parameters.f90, routine usipsu
if (iatsoil.eq.1) then
tab_sol(4)%csol = 1.7e-5
tab_sol(4)%rugthe = 0.0012
tab_sol(4)%rugdyn = 0.0012
endif
if (iatsoil.ne.0) then
do iiv = 1, nvert
soilvert(iiv)%albedo = 0.25d0
soilvert(iiv)%emissi = 0.965d0
soilvert(iiv)%ttsoil = 14.77d0
soilvert(iiv)%totwat = 0.0043d0
soilvert(iiv)%pressure = 1023.d0
soilvert(iiv)%density = 1.23d0
enddo
endif
Initialization of atmospheric
The user has to specify the percentage of each categories for all faces of the soil zone in cs_user_initialization.c:
f->
val[soil_id + f->
dim * elt_id] = 0.;
f->
val[4 + f->
dim * elt_id] = 100.;
}
}
cs_atmo_option_t * cs_glob_atmo_option
const cs_zone_t * cs_boundary_zone_by_id(int id)
Return a pointer to a boundary zone based on its id.
Definition: cs_boundary_zone.c:687
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_field_t * cs_field_by_name(const char *name)
Return a pointer to a field based on its name.
Definition: cs_field.c:2344
int soil_zone_id
Definition: cs_atmo.h:371
Field descriptor.
Definition: cs_field.h:131
cs_real_t * val
Definition: cs_field.h:152
int dim
Definition: cs_field.h:138
cs_lnum_t n_elts
Definition: cs_zone.h:64