8.3
general documentation
cs_time_step.h File Reference
#include "cs_defs.h"
+ Include dependency graph for cs_time_step.h:

Go to the source code of this file.

Data Structures

struct  cs_time_step_t
 time step descriptor More...
 
struct  cs_time_step_options_t
 time step options descriptor More...
 

Enumerations

enum  cs_time_step_type_t { CS_TIME_STEP_STEADY = -1 , CS_TIME_STEP_CONSTANT = 0 , CS_TIME_STEP_ADAPTIVE = 1 , CS_TIME_STEP_LOCAL = 2 }
 

Functions

cs_time_step_tcs_get_glob_time_step (void)
 Provide read/write access to cs_glob_time_step. More...
 
cs_time_step_options_tcs_get_glob_time_step_options (void)
 Provide read/write access to cs_glob_time_step_options. More...
 
void cs_time_step_define_variable (int is_variable)
 Define whether time step is variable or not. More...
 
void cs_time_step_define_local (int is_local)
 Define whether time step is local in space or not. More...
 
void cs_time_step_define_nt_max (int nt_max)
 Define maximum time step number. More...
 
void cs_time_step_define_t_max (double t_max)
 Define maximum time value. More...
 
void cs_time_step_define_prev (int nt_prev, double t_prev)
 Set time values from previous (usually restarted) calculations. More...
 
void cs_time_step_increment (double dt)
 Increment the global time step. More...
 
void cs_time_step_update_dt (double dt)
 Update global time step value for a time step in progress. More...
 
void cs_time_step_redefine_cur (int nt_cur, double t_cur)
 Redefine the current time values. More...
 
void cs_time_step_log_setup (void)
 Print the time stepping options to setup.log. More...
 

Variables

const cs_time_step_tcs_glob_time_step
 
const cs_time_step_options_tcs_glob_time_step_options
 

Enumeration Type Documentation

◆ cs_time_step_type_t

Enumerator
CS_TIME_STEP_STEADY 

Steady (SIMPLE) algorithm

CS_TIME_STEP_CONSTANT 

Unsteady (SIMPLEC) algorithm with constant time step

CS_TIME_STEP_ADAPTIVE 

Unsteady (SIMPLEC) algorithm with time-adaptive (varying) time step

CS_TIME_STEP_LOCAL 

Pseudo-steady with time-and-space varying time step (SIMPLEC)

Function Documentation

◆ cs_get_glob_time_step()

cs_time_step_t * cs_get_glob_time_step ( void  )

Provide read/write access to cs_glob_time_step.

Returns
pointer to global time step structure

◆ cs_get_glob_time_step_options()

cs_time_step_options_t * cs_get_glob_time_step_options ( void  )

Provide read/write access to cs_glob_time_step_options.

Returns
pointer to global time step options structure

◆ cs_time_step_define_local()

void cs_time_step_define_local ( int  is_local)

Define whether time step is local in space or not.

Parameters
[in]is_local0 if time step is uniform in space, 1 if it is local

◆ cs_time_step_define_nt_max()

void cs_time_step_define_nt_max ( int  nt_max)

Define maximum time step number.

Parameters
[in]nt_maxmaximum time step number (unlimited if negative)

◆ cs_time_step_define_prev()

void cs_time_step_define_prev ( int  nt_prev,
double  t_prev 
)

Set time values from previous (usually restarted) calculations.

Parameters
[in]nt_prevprevious time step number
[in]t_prevprevious physical time

◆ cs_time_step_define_t_max()

void cs_time_step_define_t_max ( double  t_max)

Define maximum time value.

Parameters
[in]t_maxmaximum time value (unlimited if negative)

◆ cs_time_step_define_variable()

void cs_time_step_define_variable ( int  is_variable)

Define whether time step is variable or not.

Parameters
[in]is_variable0 if time step is variable in time, 1 if it is fixed

◆ cs_time_step_increment()

void cs_time_step_increment ( double  dt)

Increment the global time step.

Parameters
[in]dttime step value to increment

◆ cs_time_step_log_setup()

void cs_time_step_log_setup ( void  )

Print the time stepping options to setup.log.

◆ cs_time_step_redefine_cur()

void cs_time_step_redefine_cur ( int  nt_cur,
double  t_cur 
)

Redefine the current time values.

Remarks
Using cs_time_step_increment is preferred, but this function may be required for reverting to a previous time step.
Parameters
[in]nt_curcurrent time step number
[in]t_curcurrent physical time

◆ cs_time_step_update_dt()

void cs_time_step_update_dt ( double  dt)

Update global time step value for a time step in progress.

This is useful when using an adaptive time step, which is incremented earlier based on an estimated time step but needs to be updated.

Parameters
[in]dttime step value to update

Variable Documentation

◆ cs_glob_time_step

const cs_time_step_t* cs_glob_time_step
extern

◆ cs_glob_time_step_options

const cs_time_step_options_t* cs_glob_time_step_options
extern