#include "cs_defs.h"#include <assert.h>#include <math.h>#include <string.h>#include "bft_mem.h"#include "bft_printf.h"#include "fvm_selector.h"#include "cs_interface.h"#include "cs_base.h"#include "cs_boundary_zone.h"#include "cs_coupling.h"#include "cs_cell_to_vertex.h"#include "cs_ext_neighborhood.h"#include "cs_field.h"#include "cs_function.h"#include "cs_gradient.h"#include "cs_gui.h"#include "cs_gui_mesh.h"#include "cs_gui_output.h"#include "cs_join.h"#include "cs_halo.h"#include "cs_halo_perio.h"#include "cs_matrix_default.h"#include "cs_mesh.h"#include "cs_mesh_adjacencies.h"#include "cs_mesh_coherency.h"#include "cs_mesh_location.h"#include "cs_mesh_quantities.h"#include "cs_mesh_to_builder.h"#include "cs_multigrid.h"#include "cs_parall.h"#include "cs_post.h"#include "cs_preprocess.h"#include "cs_prototypes.h"#include "cs_renumber.h"#include "cs_rotation.h"#include "cs_time_step.h"#include "cs_timer.h"#include "cs_timer_stats.h"#include "cs_restart.h"#include "cs_sat_coupling.h"#include "cs_preprocessor_data.h"#include "cs_volume_zone.h"#include "cs_turbomachinery.h"Functions | |
| void | cs_turbomachinery_set_model (cs_turbomachinery_model_t model) |
| Define rotor/stator model. | |
| cs_turbomachinery_model_t | cs_turbomachinery_get_model (void) |
| Return rotor/stator model. | |
| int | cs_turbomachinery_get_n_couplings (void) |
| Return number of boundary couplings used for rotor/stator model. | |
| void | cs_turbomachinery_add_rotor (const char *cell_criteria, double rotation_velocity, const double rotation_axis[3], const double rotation_invariant[3]) |
| Define a rotor by its axis and cell selection criteria. | |
| int | cs_turbomachinery_join_add (const char *sel_criteria, float fraction, float plane, int verbosity, int visualization) |
| Add a cs_join_t structure to the list of rotor/stator joinings. | |
| int | cs_turbomachinery_coupling_add (const char *sel_criteria, float tolerance, int verbosity) |
| Add a boundary coupling to the list of rotor/stator couplings. | |
| void | cs_turbomachinery_update_mesh (double *t_elapsed) |
| Update mesh for unsteady rotor/stator computation. | |
| void | cs_turbomachinery_restart_mesh (void) |
| Update mesh for unsteady rotor/stator computation in case of restart. | |
| void | cs_turbomachinery_define (void) |
| Definitions for turbomachinery computation. | |
| void | cs_turbomachinery_initialize (void) |
| Initializations for turbomachinery computation. | |
| void | cs_turbomachinery_finalize (void) |
| Free turbomachinery structure. | |
| void | cs_turbomachinery_reinit_i_face_fields (void) |
| Reinitialize interior face-based fields. | |
| void | cs_turbomachinery_resize_cell_fields (void) |
| Resize cell-based fields. | |
| void | cs_turbomachinery_rotation_matrix (int rotor_num, double theta, cs_real_t matrix[3][4]) |
| Compute rotation matrix. | |
| int | cs_turbomachinery_n_rotors (void) |
| Return number of rotors. | |
| const int * | cs_turbomachinery_get_cell_rotor_num (void) |
| Return cell rotor number. | |
| void | cs_turbomachinery_get_wall_bc_coeffs (cs_real_t **coftur, cs_real_t **hfltur) |
| Get arrays associated to wall BC update. | |
| double | cs_turbomachinery_get_rotation_velocity (int rotor_num) |
| Return rotation velocity. | |
| void | cs_turbomachinery_set_rotation_velocity (int rotor_num, double omega) |
| Set rotation velocity. | |
| void | cs_turbomachinery_set_rotation_retry (int n_max_join_retries, double dt_retry_multiplier) |
| Set turbomachinery joining retry parameters. | |
| cs_real_34_t * | cs_turbomachinery_get_rotation_matrices (double dt) |
| Build rotation matrices for a given time interval. | |
| void | cs_turbomachinery_rotate_fields (const cs_real_t dt[]) |
| Rotation of vector and tensor fields. | |
| void | cs_turbomachinery_relative_velocity (int rotor_num, const cs_real_t coords[3], cs_real_t velocity[3]) |
| Compute velocity relative to fixed coordinates at a given point. | |
| void | cs_turbomachinery_restart_read (cs_restart_t *r) |
| Read turbomachinery metadata from restart file. | |
| void | cs_turbomachinery_restart_write (cs_restart_t *r) |
| Write turbomachinery metadata to checkpoint file. | |
| void | cs_turbomachinery_define_functions (void) |
| Create or access function objects specific to turbomachinery models (relative_pressure, relative_velocity). | |
| void cs_turbomachinery_add_rotor | ( | const char * | cell_criteria, |
| double | rotation_velocity, | ||
| const double | rotation_axis[3], | ||
| const double | rotation_invariant[3] ) |
Define a rotor by its axis and cell selection criteria.
| [in] | cell_criteria | cell selection criteria string |
| [in] | rotation_velocity | rotation velocity, in radians/second |
| [in] | rotation_axis | rotation axis vector |
| [in] | rotation_invariant | rotation invariant point |
| int cs_turbomachinery_coupling_add | ( | const char * | sel_criteria, |
| float | tolerance, | ||
| int | verbosity ) |
Add a boundary coupling to the list of rotor/stator couplings.
| [in] | sel_criteria | boundary face selection criteria |
| [in] | tolerance | value of the search tolerance |
| [in] | verbosity | level of verbosity required |
| void cs_turbomachinery_define | ( | void | ) |
Definitions for turbomachinery computation.
| void cs_turbomachinery_define_functions | ( | void | ) |
Create or access function objects specific to turbomachinery models (relative_pressure, relative_velocity).
| void cs_turbomachinery_finalize | ( | void | ) |
Free turbomachinery structure.
| const int * cs_turbomachinery_get_cell_rotor_num | ( | void | ) |
Return cell rotor number.
Each cell may be associated with a given rotor, or rotation, with 0 indicating that that cell does not rotate.
| cs_turbomachinery_model_t cs_turbomachinery_get_model | ( | void | ) |
Return rotor/stator model.
| int cs_turbomachinery_get_n_couplings | ( | void | ) |
Return number of boundary couplings used for rotor/stator model.
Joining-based definitions are not counted here.
| cs_real_34_t * cs_turbomachinery_get_rotation_matrices | ( | double | dt | ) |
Build rotation matrices for a given time interval.
The caller is responsible for freeing the array when not needed.
| [in] | dt | associated time delta (0 for current, unmodified time) |
| double cs_turbomachinery_get_rotation_velocity | ( | int | rotor_num | ) |
Return rotation velocity.
| [in] | rotor_num | rotor number (1 to n numbering) |
Get arrays associated to wall BC update.
| [out] | coftur | values of "cofimp" term before geometry update |
| [out] | hfltur | local exchange coefficient before geometry update |
| void cs_turbomachinery_initialize | ( | void | ) |
Initializations for turbomachinery computation.
| int cs_turbomachinery_join_add | ( | const char * | sel_criteria, |
| float | fraction, | ||
| float | plane, | ||
| int | verbosity, | ||
| int | visualization ) |
Add a cs_join_t structure to the list of rotor/stator joinings.
| [in] | sel_criteria | boundary face selection criteria |
| [in] | fraction | value of the fraction parameter |
| [in] | plane | value of the plane parameter |
| [in] | verbosity | level of verbosity required |
| [in] | visualization | level of visualization required |
| int cs_turbomachinery_n_rotors | ( | void | ) |
Return number of rotors.
Note that the number of associated rotations is n_rotors + 1, as the first rotation id is reserved for the fixed portion of the domain.
| void cs_turbomachinery_reinit_i_face_fields | ( | void | ) |
Reinitialize interior face-based fields.
| void cs_turbomachinery_relative_velocity | ( | int | rotor_num, |
| const cs_real_t | coords[3], | ||
| cs_real_t | velocity[3] ) |
Compute velocity relative to fixed coordinates at a given point.
| [in] | rotor_num | rotor number (1 to n numbering) |
| [in] | coords | point coordinates |
| [out] | velocity | velocity relative to fixed coordinates |
| void cs_turbomachinery_resize_cell_fields | ( | void | ) |
Resize cell-based fields.
This function only handles fields owning their values.
| void cs_turbomachinery_restart_mesh | ( | void | ) |
Update mesh for unsteady rotor/stator computation in case of restart.
Reads mesh from checkpoint when available.
| void cs_turbomachinery_restart_read | ( | cs_restart_t * | r | ) |
Read turbomachinery metadata from restart file.
The mesh is handled separately.
| [in,out] | r | associated restart file pointer |
| void cs_turbomachinery_restart_write | ( | cs_restart_t * | r | ) |
Write turbomachinery metadata to checkpoint file.
The mesh is handled separately.
| [in,out] | r | associated restart file pointer |
| void cs_turbomachinery_rotate_fields | ( | const cs_real_t | dt[] | ) |
Rotation of vector and tensor fields.
| void cs_turbomachinery_rotation_matrix | ( | int | rotor_num, |
| double | theta, | ||
| cs_real_t | matrix[3][4] ) |
Compute rotation matrix.
| [in] | rotor_num | rotor number (1 to n numbering) |
| [in] | theta | rotation angle, in radians |
| [out] | matrix | resulting rotation matrix |
| void cs_turbomachinery_set_model | ( | cs_turbomachinery_model_t | model | ) |
Define rotor/stator model.
| void cs_turbomachinery_set_rotation_retry | ( | int | n_max_join_retries, |
| double | dt_retry_multiplier ) |
Set turbomachinery joining retry parameters.
When a joing leads to a different number of boundary faces from the previous position, the rotor positions may be perturbed by a small quantity to try to obtain a better joining.
param[in] n_max_join_retries maximum number of retries before considering the joining has failed param[in] dt_retry_multiplier time step multiplier for new position retry
| void cs_turbomachinery_set_rotation_velocity | ( | int | rotor_num, |
| double | omega ) |
Set rotation velocity.
param[in] rotor_num rotor number (1 to n numbering) param[in] omega rotation velocity
| void cs_turbomachinery_update_mesh | ( | double * | t_elapsed | ) |
Update mesh for unsteady rotor/stator computation.
| [out] | t_elapsed | elapsed computation time |