#include "cs_defs.h"
#include "cs_mesh_quantities.h"
#include "cs_medcoupling_intersector.h"
#include "cs_stl.h"
#include "cs_xdef.h"
Go to the source code of this file.
Data Structures | |
struct | cs_porosity_ibm_opt_t |
struct | cs_ibm_object_t |
struct | cs_ibm_t |
Typedefs | |
typedef int() | cs_cutcell_func_t(const cs_lnum_t c_id, const cs_real_3_t xyz, const cs_real_t t, const int num_object) |
Functions | |
cs_ibm_object_t * | cs_ibm_object_by_id (int obj_id) |
Get an object based on its id. More... | |
cs_ibm_object_t * | cs_ibm_object_by_name_try (const char *name) |
Try to get an object based on its name. Returns NULL if not found. More... | |
cs_ibm_object_t * | cs_ibm_object_by_name (const char *name) |
Get an object based on its name. Error if not found. More... | |
cs_ibm_t * | cs_ibm_create (void) |
void | cs_ibm_finalize (void) |
void | cs_immersed_boundaries (const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities) |
Define immersed boundaries in time and space (solid(s) interior part). More... | |
void | cs_volumic_zone_porosity (const cs_mesh_quantities_t *mesh_quantities) |
void | cs_user_ibm_modify (const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities) |
User function. Locally modify a given porosity to take into account erosion effect (for instance) More... | |
int | cs_ibm_object_compute_cut_porosity (const cs_lnum_t c_id, const cs_real_3_t xyz, const cs_real_t t, const int num_object) |
Check if a point is solid or fluid based on the cut-cell method. More... | |
void | cs_ibm_add_object_from_file (const char *name, cs_ibm_algo_type_t method, const char *file_name, bool solve_fsi) |
Define an object from a file using STL or MED formats. More... | |
void | cs_ibm_add_object_from_func (const char *name, cs_cutcell_func_t *cutcell_func, bool solve_fsi, int n_nodes) |
Define an object from a function used in the cutcell algorithm. More... | |
void | cs_ibm_stl_define_ext_points (const char *name, const int n_pts, cs_real_t *pts_coords) |
Define exterior points for an STL object. More... | |
void | cs_ibm_object_rotate (const char *name, cs_real_t angle, cs_real_t axis[3], cs_real_t center[3]) |
Rotate an object based on the STL or MED algorithms. More... | |
void | cs_ibm_object_set_property_const (cs_ibm_object_t *obj, cs_ibm_object_property_type_t ppty_id, cs_real_t val) |
Define a new constant property definition for an object. More... | |
void | cs_ibm_object_translate (const char *name, cs_real_t vector[3]) |
Translate an object based on the STL or MED algorithms. More... | |
void | cs_ibm_object_scale (const char *name, cs_real_t factor) |
Scale an object based on a factor. More... | |
void | cs_ibm_user_parameters (void) |
Apply user parameters. More... | |
void | cs_ibm_init_writer (void) |
Init writers for STL or MED objects. More... | |
void | cs_ibm_object_transform_from_init (cs_ibm_object_t *obj, cs_real_34_t matrix) |
Transform an object from its initial state using a transformation matrix. More... | |
void | cs_ibm_object_compute_intersect_vol (cs_ibm_object_t *obj, const cs_mesh_t *m, const cs_real_t *cell_vol, cs_real_t *obj_frac_tot, int *indic) |
Compute the volume fraction of an object over all cells. More... | |
void | cs_user_ibm_define_objects (void) |
User function in which the user defines the objects to model. More... | |
void | cs_user_ibm_parameters (void) |
User function to set global parameters for the immersed boundaries module. More... | |
void | cs_user_ibm_object_transformations (const cs_real_t time) |
User function where to apply predefined transformations to med/stl based objects. More... | |
void | cs_user_ibm_solid_por (const cs_lnum_t c_id, const cs_real_3_t xyz, const cs_real_t t, const int num_object) |
User function which allows the definition of a 'porous' object. More... | |
void | cs_ibm_volumic_zone (const cs_mesh_quantities_t *mesh_quantities) |
Define space immersed boundaries on a set of zones defined by the user in the GUI. More... | |
Variables | |
cs_porosity_ibm_opt_t * | cs_glob_porosity_ibm_opt |
cs_ibm_t * | cs_ibm |
typedef int() cs_cutcell_func_t(const cs_lnum_t c_id, const cs_real_3_t xyz, const cs_real_t t, const int num_object) |
enum cs_ibm_algo_type_t |
enum cs_ibm_model_type_t |
void cs_ibm_add_object_from_file | ( | const char * | name, |
cs_ibm_algo_type_t | method, | ||
const char * | file_name, | ||
bool | solve_fsi | ||
) |
Define an object from a file using STL or MED formats.
[in] | name | name of the object |
[in] | method | Porosity computation method |
[in] | file_name | file name |
[in] | solve_fsi | Is the object used in the FSI resolution |
void cs_ibm_add_object_from_func | ( | const char * | name, |
cs_cutcell_func_t * | cutcell_func, | ||
bool | solve_fsi, | ||
int | n_nodes | ||
) |
Define an object from a function used in the cutcell algorithm.
[in] | name | name of the object |
[in] | cutcell_func | pointer to the cutcell function of the object |
[in] | solve_fsi | Is the object used in the FSI resolution |
[in] | n_nodes | Number of nodes if the object is deformable |
cs_ibm_t* cs_ibm_create | ( | void | ) |
void cs_ibm_finalize | ( | void | ) |
void cs_ibm_init_writer | ( | void | ) |
Init writers for STL or MED objects.
cs_ibm_object_t* cs_ibm_object_by_id | ( | int | obj_id | ) |
Get an object based on its id.
[in] | obj_id | id of the object |
cs_ibm_object_t* cs_ibm_object_by_name | ( | const char * | name | ) |
Get an object based on its name. Error if not found.
[in] | name | name of the object to get |
cs_ibm_object_t* cs_ibm_object_by_name_try | ( | const char * | name | ) |
Try to get an object based on its name. Returns NULL if not found.
Get an object based on its name.
[in] | name | name of the object to get |
[in] | name | name of the object to get |
Get an object based on its name.
[in] | name | name of the object to get |
[in] | name | name of the object to get |
int cs_ibm_object_compute_cut_porosity | ( | const cs_lnum_t | c_id, |
const cs_real_3_t | xyz, | ||
const cs_real_t | t, | ||
const int | num_object | ||
) |
Check if a point is solid or fluid based on the cut-cell method.
[in] | c_id | local cell number |
[out] | ipenal | indicator for cut cells algo |
[in] | xyz | x, y, z coordinates of the current position |
[in] | t | time value for the current time step |
[in] | num_object | num of fsi object (if fsi activated) |
[in] | c_id | local cell number |
[in] | xyz | x, y, z coordinates of the current position |
[in] | t | time value for the current time step |
[in] | num_object | num of fsi object (if fsi activated) |
void cs_ibm_object_compute_intersect_vol | ( | cs_ibm_object_t * | obj, |
const cs_mesh_t * | m, | ||
const cs_real_t * | cell_vol, | ||
cs_real_t * | obj_frac_tot, | ||
int * | indic | ||
) |
Compute the volume fraction of an object over all cells.
[in] | obj | pointer to object structure |
[in] | m | pointer to mesh structure |
[in] | cell_vol | pointer to cell volume array |
[out] | obj_frac_tot | array containing the total vol fraction of solids |
[in] | indic | indicator array |
void cs_ibm_object_rotate | ( | const char * | name, |
cs_real_t | angle, | ||
cs_real_t | axis[3], | ||
cs_real_t | center[3] | ||
) |
Rotate an object based on the STL or MED algorithms.
[in] | name | name of the object |
[in] | angle | angle of rotation |
[in] | axis | axis of rotation |
[in] | center | center of rotation |
void cs_ibm_object_scale | ( | const char * | name, |
cs_real_t | factor | ||
) |
Scale an object based on a factor.
[in] | name | name of the object |
[in] | factor | scaling factor |
void cs_ibm_object_set_property_const | ( | cs_ibm_object_t * | obj, |
cs_ibm_object_property_type_t | ppty_id, | ||
cs_real_t | val | ||
) |
Define a new constant property definition for an object.
[in] | obj | pointer to object |
[in] | ppty_id | property id (si enum for list) |
[in] | val | property constant value |
void cs_ibm_object_transform_from_init | ( | cs_ibm_object_t * | obj, |
cs_real_34_t | matrix | ||
) |
Transform an object from its initial state using a transformation matrix.
[in] | obj | pointer to object structure |
[in] | matrix | transformation matrix |
void cs_ibm_object_translate | ( | const char * | name, |
cs_real_t | vector[3] | ||
) |
Translate an object based on the STL or MED algorithms.
[in] | name | name of the object |
[in] | vector | translation vector |
void cs_ibm_stl_define_ext_points | ( | const char * | name, |
const int | n_pts, | ||
cs_real_t * | pts_coords | ||
) |
Define exterior points for an STL object.
[in] | name | name of the object |
[in] | n_pts | number of points |
[in] | pts_coords | coordinates of the points |
Define exterior points for an STL object.
[in] | name | name of the object |
[in] | n_pts | number of points |
[in] | pts_coords | coordinates of the points |
void cs_ibm_user_parameters | ( | void | ) |
Apply user parameters.
void cs_ibm_volumic_zone | ( | const cs_mesh_quantities_t * | mesh_quantities | ) |
Define space immersed boundaries on a set of zones defined by the user in the GUI.
[in] | mesh_quantities | pointer to associated mesh quantities structure |
void cs_immersed_boundaries | ( | const cs_mesh_t * | mesh, |
const cs_mesh_quantities_t * | mesh_quantities | ||
) |
Define immersed boundaries in time and space (solid(s) interior part).
This function is called several times during each time step.
Ipenal: 1 means only solid and 0 only fluid.
Warning, porosity values have to be 0 or 1.
The solid(s) velocities and porosity are prescirbed within the user function (cs_user_ibm).
[in] | mesh | pointer to associated mesh structure |
[in] | mesh_quantities | pointer to associated mesh quantities |
void cs_user_ibm_define_objects | ( | void | ) |
User function in which the user defines the objects to model.
void cs_user_ibm_modify | ( | const cs_mesh_t * | mesh, |
const cs_mesh_quantities_t * | mesh_quantities | ||
) |
User function. Locally modify a given porosity to take into account erosion effect (for instance)
This function is called for each time step. Porosity will be modified if cs_ibm->porosity_user_source_term_modification = true
[in] | mesh | pointer to associated mesh structure |
[in] | mesh_quantities | pointer to associated mesh quantities |
void cs_user_ibm_object_transformations | ( | const cs_real_t | time | ) |
User function where to apply predefined transformations to med/stl based objects.
[in] | t | time value for the current time step |
void cs_user_ibm_parameters | ( | void | ) |
User function to set global parameters for the immersed boundaries module.
void cs_user_ibm_solid_por | ( | const cs_lnum_t | c_id, |
const cs_real_3_t | xyz, | ||
const cs_real_t | t, | ||
const int | num_object | ||
) |
User function which allows the definition of a 'porous' object.
[in] | c_id | local cell number |
[in] | xyz | x, y, z coordinates of the current position |
[in] | t | time value for the current time step |
[in] | num_object | num of fsi object (if fsi activated) |
void cs_volumic_zone_porosity | ( | const cs_mesh_quantities_t * | mesh_quantities | ) |
|
extern |
|
extern |