My Project
programmer's documentation
|
#include "cs_defs.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ple_locator.h>
#include "bft_mem.h"
#include "bft_error.h"
#include "bft_printf.h"
#include "fvm_nodal_extract.h"
#include "cs_base.h"
#include "cs_ctwr_air_props.h"
#include "cs_field.h"
#include "cs_field_pointer.h"
#include "cs_halo.h"
#include "cs_halo_perio.h"
#include "cs_log.h"
#include "cs_math.h"
#include "cs_mesh.h"
#include "cs_mesh_location.h"
#include "cs_mesh_quantities.h"
#include "cs_parall.h"
#include "cs_physical_constants.h"
#include "cs_post.h"
#include "cs_restart.h"
#include "cs_selector.h"
#include "cs_volume_zone.h"
#include "cs_ctwr.h"
Functions | |
cs_ctwr_option_t * | cs_get_glob_ctwr_option (void) |
void | cs_ctwr_define (const char zone_criteria[], cs_ctwr_zone_type_t zone_type, cs_real_t delta_t, cs_real_t relax, cs_real_t t_l_bc, cs_real_t q_l_bc, cs_real_t xap, cs_real_t xnp, cs_real_t surface, cs_real_t xleak_fac) |
Define a cooling tower exchange zone. More... | |
void | cs_ctwr_field_pointer_map (void) |
Map fields used by the cooling tower module to pointers. More... | |
void | cs_ctwr_build_zones (void) |
Define zones. More... | |
void | cs_ctwr_build_all (void) |
Define the cells belonging to the different packing zones. More... | |
void | cs_ctwr_all_destroy (void) |
Destroy cs_ctwr_t structures. More... | |
void | cs_ctwr_log_setup (void) |
Log Packing zone definition setup information. More... | |
void | cs_ctwr_log_balance (void) |
Perform balances in packing zones. More... | |
void | cs_ctwr_init_field_vars (cs_real_t rho0, cs_real_t t0, cs_real_t p0, cs_real_t molmassrat) |
Initialize the field variables. More... | |
void | cs_ctwr_init_flow_vars (cs_real_t liq_mass_flow[]) |
Initialize the flow variables relevant to the cooling tower scalars inside the packing zones. More... | |
void | cs_ctwr_restart_field_vars (cs_real_t rho0, cs_real_t t0, cs_real_t p0, cs_real_t humidity0, cs_real_t molmassrat) |
Reset the field variables based on the restart values. More... | |
void | cs_ctwr_phyvar_update (cs_real_t rho0, cs_real_t t0, cs_real_t p0, cs_real_t molmassrat) |
Update the thermo physical properties fields for the humid air and the liquid. More... | |
void | cs_ctwr_source_term (int f_id, const cs_real_t p0, const cs_real_t molmassrat, cs_real_t exp_st[], cs_real_t imp_st[]) |
Phase change source terms - Exchange terms between the injected liquid and the water vapor phase in the bulk, humid air. More... | |
void | cs_ctwr_bulk_mass_source_term (const cs_real_t p0, const cs_real_t molmassrat, cs_real_t mass_source[]) |
Phase change mass source term from the evaporating liquid to the bulk, humid air. More... | |
cs_ctwr_zone_t * | cs_ctwr_by_id (int ct_id) |
void cs_ctwr_all_destroy | ( | void | ) |
Destroy cs_ctwr_t structures.
void cs_ctwr_build_all | ( | void | ) |
Define the cells belonging to the different packing zones.
void cs_ctwr_build_zones | ( | void | ) |
Define zones.
void cs_ctwr_bulk_mass_source_term | ( | const cs_real_t | p0, |
const cs_real_t | molmassrat, | ||
cs_real_t | mass_source[] | ||
) |
Phase change mass source term from the evaporating liquid to the bulk, humid air.
Careful, this is different from an injection source term, which would normally be handled with 'cs_user_mass_source_term'
[in] | p0 | Reference pressure |
[in] | molmassrat | Dry air to water vapor molecular mass ratio |
[in] | mass_source | Mass source term |
cs_ctwr_zone_t* cs_ctwr_by_id | ( | int | ct_id | ) |
void cs_ctwr_define | ( | const char | zone_criteria[], |
cs_ctwr_zone_type_t | zone_type, | ||
cs_real_t | delta_t, | ||
cs_real_t | relax, | ||
cs_real_t | t_l_bc, | ||
cs_real_t | q_l_bc, | ||
cs_real_t | xap, | ||
cs_real_t | xnp, | ||
cs_real_t | surface, | ||
cs_real_t | xleak_fac | ||
) |
Define a cooling tower exchange zone.
[in] | zone_criteria | zone selection criteria |
[in] | zone_type | exchange zone type |
[in] | delta_t | imposed delta temperature delta between inlet and oulet of the zone |
[in] | relax | relaxation of the imposed delta temperature |
[in] | t_l_bc | liquid water temperature at the inlet |
[in] | q_l_bc | mass flow rate at the inlet |
[in] | xap | beta_x_0 of the exchange law |
[in] | xnp | exponent n of the exchange law |
[in] | surface | total Surface of ingoing water |
[in] | xleak_fac | leakage factor (ratio of outlet/inlet flow rate) |
void cs_ctwr_field_pointer_map | ( | void | ) |
Map fields used by the cooling tower module to pointers.
Initialize the field variables.
[in] | rho0 | Reference density of humid air |
[in] | t0 | Reference temperature of humid air |
[in] | p0 | Reference pressure |
[in] | molmassrat | Dry air to water vapor molecular mass ratio |
void cs_ctwr_init_flow_vars | ( | cs_real_t | liq_mass_flow[] | ) |
Initialize the flow variables relevant to the cooling tower scalars inside the packing zones.
[in,out] | liq_mass_flow | Liquid mass flow rate |
void cs_ctwr_log_balance | ( | void | ) |
Perform balances in packing zones.
void cs_ctwr_log_setup | ( | void | ) |
Log Packing zone definition setup information.
Update the thermo physical properties fields for the humid air and the liquid.
[in] | rho0 | Reference density of humid air |
[in] | t0 | Reference temperature of humid air |
[in] | p0 | Reference pressure |
[in] | molmassrat | Dry air to water vapor molecular mass ratio |
void cs_ctwr_restart_field_vars | ( | cs_real_t | rho0, |
cs_real_t | t0, | ||
cs_real_t | p0, | ||
cs_real_t | humidity0, | ||
cs_real_t | molmassrat | ||
) |
Reset the field variables based on the restart values.
[in] | rho0 | Reference density of humid air |
[in] | t0 | Reference temperature of humid air |
[in] | p0 | Reference pressure |
[in] | humidity0 | Reference humidity |
[in] | molmassrat | Dry air to water vapor molecular mass ratio |
void cs_ctwr_source_term | ( | int | f_id, |
const cs_real_t | p0, | ||
const cs_real_t | molmassrat, | ||
cs_real_t | exp_st[], | ||
cs_real_t | imp_st[] | ||
) |
Phase change source terms - Exchange terms between the injected liquid and the water vapor phase in the bulk, humid air.
[in] | f_id | field id |
[in] | p0 | Reference pressure |
[in] | molmassrat | dry air to water vapor molecular mass ratio |
[in,out] | exp_st | Explicit source term |
[in,out] | imp_st | Implicit source term |
cs_ctwr_option_t* cs_get_glob_ctwr_option | ( | void | ) |