My Project
programmer's documentation
Functions
cs_ctwr.c File Reference
#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"
Include dependency graph for cs_ctwr.c:

Functions

cs_ctwr_option_tcs_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_tcs_ctwr_by_id (int ct_id)
 

Function Documentation

◆ cs_ctwr_all_destroy()

void cs_ctwr_all_destroy ( void  )

Destroy cs_ctwr_t structures.

◆ cs_ctwr_build_all()

void cs_ctwr_build_all ( void  )

Define the cells belonging to the different packing zones.

◆ cs_ctwr_build_zones()

void cs_ctwr_build_zones ( void  )

Define zones.

◆ cs_ctwr_bulk_mass_source_term()

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'

Parameters
[in]p0Reference pressure
[in]molmassratDry air to water vapor molecular mass ratio
[in]mass_sourceMass source term

◆ cs_ctwr_by_id()

cs_ctwr_zone_t* cs_ctwr_by_id ( int  ct_id)

◆ cs_ctwr_define()

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.

Parameters
[in]zone_criteriazone selection criteria
[in]zone_typeexchange zone type
[in]delta_timposed delta temperature delta between inlet and oulet of the zone
[in]relaxrelaxation of the imposed delta temperature
[in]t_l_bcliquid water temperature at the inlet
[in]q_l_bcmass flow rate at the inlet
[in]xapbeta_x_0 of the exchange law
[in]xnpexponent n of the exchange law
[in]surfacetotal Surface of ingoing water
[in]xleak_facleakage factor (ratio of outlet/inlet flow rate)

◆ cs_ctwr_field_pointer_map()

void cs_ctwr_field_pointer_map ( void  )

Map fields used by the cooling tower module to pointers.

◆ cs_ctwr_init_field_vars()

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.

Parameters
[in]rho0Reference density of humid air
[in]t0Reference temperature of humid air
[in]p0Reference pressure
[in]molmassratDry air to water vapor molecular mass ratio

◆ cs_ctwr_init_flow_vars()

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.

Parameters
[in,out]liq_mass_flowLiquid mass flow rate

◆ cs_ctwr_log_balance()

void cs_ctwr_log_balance ( void  )

Perform balances in packing zones.

◆ cs_ctwr_log_setup()

void cs_ctwr_log_setup ( void  )

Log Packing zone definition setup information.

◆ cs_ctwr_phyvar_update()

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.

Parameters
[in]rho0Reference density of humid air
[in]t0Reference temperature of humid air
[in]p0Reference pressure
[in]molmassratDry air to water vapor molecular mass ratio

◆ cs_ctwr_restart_field_vars()

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.

Parameters
[in]rho0Reference density of humid air
[in]t0Reference temperature of humid air
[in]p0Reference pressure
[in]humidity0Reference humidity
[in]molmassratDry air to water vapor molecular mass ratio

◆ cs_ctwr_source_term()

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.

Parameters
[in]f_idfield id
[in]p0Reference pressure
[in]molmassratdry air to water vapor molecular mass ratio
[in,out]exp_stExplicit source term
[in,out]imp_stImplicit source term

◆ cs_get_glob_ctwr_option()

cs_ctwr_option_t* cs_get_glob_ctwr_option ( void  )