Structure and functions handling the Maxwell module dedicated to the resolution of electro-magnetic equations. More...
 Include dependency graph for cs_maxwell.h:
 Include dependency graph for cs_maxwell.h:Go to the source code of this file.
| Macros | |
| #define | CS_MAXWELL_ESTATIC_EQNAME "electrostatic" | 
| #define | CS_MAXWELL_EFIELD_NAME "electric_field" | 
| #define | CS_MAXWELL_DFIELD_NAME "electric_induction" | 
| #define | CS_MAXWELL_MSTATIC_EQNAME "magnetostatic" | 
| #define | CS_MAXWELL_MFIELD_NAME "magnetic_field" | 
| #define | CS_MAXWELL_BFIELD_NAME "magnetic_induction" | 
| #define | CS_MAXWELL_JEFFECT_NAME "joule_effect" | 
| Flags specifying the modelling for the Maxwell module | |
| These fields are considered: H (A/m) the magnetic field E (V/m) the electric field B (Vs/m^2) the magnetic induction or magnetic flux density D (As/m^2) the electric induction or electric flux density Moreover, one considers rho_e the electric charge density j the electric source current (or current for short) One assumes a quasi-static approximation of the Maxwell equations i.e. ones solves the Ampere equation: curl(H) = j and one solves the Faraday equation: curl(E) = -partial_t B | |
| #define | CS_MAXWELL_MODEL_ELECTROSTATIC (1 << 0) /* 1 */ | 
| Solve the equation -div(epsilon grad(phi)) = rho_e + BCs which results from div(D) = rho_e, D = epsilon E and E = -grad(phi)  More... | |
| #define | CS_MAXWELL_MODEL_MAGNETOSTATIC (1 << 1) /* 2 */ | 
| Solve the system curl(H) = j, div(mu H) = 0 + BCs which yields curl( 1/mu curl(A)) = j and div(A) = 0 (Coulomb gauge) + BCs if one sets: mu.H = curl(A)  More... | |
| Flags specifying options for the Maxwell module | |
| #define | CS_MAXWELL_A_PHI_FORMULATION (1 << 0) /* 1 */ | 
| Vector-valued potential (A) and scalar-valued potential (phi) are introduced to solve the Maxwell equations. One introduces the following identities: curl(A) = B and E = -partial_t A - grad(phi)  More... | |
| #define | CS_MAXWELL_JOULE_EFFECT (1 << 1) /* 2 */ | 
| Take into account the Joule effect.  More... | |
| Functions | |
| bool | cs_maxwell_is_activated (void) | 
| Test if the computation of Maxwell equations is activated.  More... | |
| cs_maxwell_t * | cs_maxwell_activate (cs_flag_t model, cs_flag_t options) | 
| Activate the future computation of the Maxwell equations.  More... | |
| cs_maxwell_t * | cs_maxwell_destroy_all (void) | 
| Free the main structure related to the Maxwell module.  More... | |
| void | cs_maxwell_init_setup (void) | 
| Setup equations/properties related to the Maxwell module.  More... | |
| void | cs_maxwell_finalize_setup (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant) | 
| Finalize the setup stage for equations related to the Maxwell module.  More... | |
| void | cs_maxwell_log_setup (void) | 
| Log a summary of the Maxwell module.  More... | |
| void | cs_maxwell_compute_steady_state (const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant) | 
| Solve if needed the steady-state equations related to the Maxwell module.  More... | |
| void | cs_maxwell_compute (const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant) | 
| Solve equations related to the Maxwell module.  More... | |
| void | cs_maxwell_update (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, bool cur2prev) | 
| Update/initialize the Maxwell module according to the settings.  More... | |
| void | cs_maxwell_extra_op (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant) | 
| Predefined extra-operations for the Maxwell module.  More... | |
| void | cs_maxwell_extra_post (void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *time_step) | 
| Predefined post-processing output for the Maxwell module. Prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t)  More... | |
Structure and functions handling the Maxwell module dedicated to the resolution of electro-magnetic equations.
| #define CS_MAXWELL_A_PHI_FORMULATION (1 << 0) /* 1 */ | 
Vector-valued potential (A) and scalar-valued potential (phi) are introduced to solve the Maxwell equations. One introduces the following identities: curl(A) = B and E = -partial_t A - grad(phi)
| #define CS_MAXWELL_BFIELD_NAME "magnetic_induction" | 
| #define CS_MAXWELL_DFIELD_NAME "electric_induction" | 
| #define CS_MAXWELL_EFIELD_NAME "electric_field" | 
| #define CS_MAXWELL_ESTATIC_EQNAME "electrostatic" | 
| #define CS_MAXWELL_JEFFECT_NAME "joule_effect" | 
| #define CS_MAXWELL_JOULE_EFFECT (1 << 1) /* 2 */ | 
Take into account the Joule effect.
| #define CS_MAXWELL_MFIELD_NAME "magnetic_field" | 
| #define CS_MAXWELL_MODEL_ELECTROSTATIC (1 << 0) /* 1 */ | 
Solve the equation -div(epsilon grad(phi)) = rho_e + BCs which results from div(D) = rho_e, D = epsilon E and E = -grad(phi)
| #define CS_MAXWELL_MODEL_MAGNETOSTATIC (1 << 1) /* 2 */ | 
Solve the system curl(H) = j, div(mu H) = 0 + BCs which yields curl( 1/mu curl(A)) = j and div(A) = 0 (Coulomb gauge) + BCs if one sets: mu.H = curl(A)
| #define CS_MAXWELL_MSTATIC_EQNAME "magnetostatic" | 
Activate the future computation of the Maxwell equations.
| [in] | model | type of modelling | 
| [in] | options | flag to handle optional parameters | 
| void cs_maxwell_compute | ( | const cs_mesh_t * | mesh, | 
| const cs_time_step_t * | time_step, | ||
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant | ||
| ) | 
Solve equations related to the Maxwell module.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| [in] | time_step | pointer to a cs_time_step_t structure | 
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| void cs_maxwell_compute_steady_state | ( | const cs_mesh_t * | mesh, | 
| const cs_time_step_t * | time_step, | ||
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant | ||
| ) | 
Solve if needed the steady-state equations related to the Maxwell module.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| [in] | time_step | pointer to a cs_time_step_t structure | 
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| cs_maxwell_t* cs_maxwell_destroy_all | ( | void | ) | 
Free the main structure related to the Maxwell module.
| void cs_maxwell_extra_op | ( | const cs_cdo_connect_t * | connect, | 
| const cs_cdo_quantities_t * | quant | ||
| ) | 
Predefined extra-operations for the Maxwell module.
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| void cs_maxwell_extra_post | ( | void * | input, | 
| int | mesh_id, | ||
| int | cat_id, | ||
| int | ent_flag[5], | ||
| cs_lnum_t | n_cells, | ||
| cs_lnum_t | n_i_faces, | ||
| cs_lnum_t | n_b_faces, | ||
| const cs_lnum_t | cell_ids[], | ||
| const cs_lnum_t | i_face_ids[], | ||
| const cs_lnum_t | b_face_ids[], | ||
| const cs_time_step_t * | time_step | ||
| ) | 
Predefined post-processing output for the Maxwell module. Prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t)
| [in,out] | input | pointer to an optional structure (here a cs_gwf_t structure) | 
| [in] | mesh_id | id of the output mesh for the current call | 
| [in] | cat_id | category id of the output mesh for this call | 
| [in] | ent_flag | indicate global presence of cells (ent_flag[0]), interior faces (ent_flag[1]), boundary faces (ent_flag[2]), particles (ent_flag[3]) or probes (ent_flag[4]) | 
| [in] | n_cells | local number of cells of post_mesh | 
| [in] | n_i_faces | local number of interior faces of post_mesh | 
| [in] | n_b_faces | local number of boundary faces of post_mesh | 
| [in] | cell_ids | list of cells (0 to n-1) | 
| [in] | i_face_ids | list of interior faces (0 to n-1) | 
| [in] | b_face_ids | list of boundary faces (0 to n-1) | 
| [in] | time_step | pointer to a cs_time_step_t struct. | 
| void cs_maxwell_finalize_setup | ( | const cs_cdo_connect_t * | connect, | 
| const cs_cdo_quantities_t * | quant | ||
| ) | 
Finalize the setup stage for equations related to the Maxwell module.
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| void cs_maxwell_init_setup | ( | void | ) | 
Setup equations/properties related to the Maxwell module.
| bool cs_maxwell_is_activated | ( | void | ) | 
Test if the computation of Maxwell equations is activated.
| void cs_maxwell_log_setup | ( | void | ) | 
Log a summary of the Maxwell module.
| void cs_maxwell_update | ( | const cs_mesh_t * | mesh, | 
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant, | ||
| const cs_time_step_t * | ts, | ||
| bool | cur2prev | ||
| ) | 
Update/initialize the Maxwell module according to the settings.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| [in] | ts | pointer to a cs_time_step_t structure | 
| [in] | cur2prev | true or false |