Compute a time dependent parameter value from a time table defined by the user.
To access a time table defined variable when defining boundary conditions, a callback function of the type of type cs_dof_func_t can be defined, such as the following (for a time table named "inlet_temperature"):
static void
                    bool              dense_output,
                    void             *input,
{
  
 
  
                                     time,
                                     1,      
                                     false); 
 
  
 
    const cs_lnum_t  face_id = (elt_ids == NULL) ? i : elt_ids[i];
 
    const cs_lnum_t  j = dense_output ? i : face_id;
 
    retval[j] = inlet_temp;
  }
}
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
const cs_time_step_t * cs_glob_time_step
cs_real_t cs_time_table_compute_time_value(const char *name, cs_real_t t, const int col, bool overwrite_prev)
Compute value using a given abscissa and a specific column.
Definition: cs_time_table.c:643
double t_cur
Definition: cs_time_step.h:80
 Note that accessing the time table value in the function above is done through the call to cs_time_table_compute_time_value.
The callback function can then be assigned to the zone named "inlet" for variable "scalar1" in the usual way (in cs_user_boundary_conditions_setup):
 
                                 "inlet",                
                                 _time_table_t_inlet,    
                                 NULL);                  
cs_equation_param_t * cs_equation_param_by_name(const char *eqname)
Return the cs_equation_param_t structure associated to a cs_equation_t structure based on the equatio...
Definition: cs_equation.c:615
cs_xdef_t * cs_equation_add_bc_by_dof_func(cs_equation_param_t *eqp, const cs_param_bc_type_t bc_type, const char *z_name, cs_flag_t loc_flag, cs_dof_func_t *func, void *input)
Define and initialize a new structure to set a boundary condition related to the given cs_equation_pa...
Definition: cs_equation_param.cxx:2790
const cs_flag_t cs_flag_boundary_face
Definition: cs_flag.c:80
@ CS_PARAM_BC_DIRICHLET
Definition: cs_param_types.h:479
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:193