programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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_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

void cs_ctwr_define (const char zone_criteria[], cs_ctwr_model_t model, 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)
 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_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

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'

Parameters
[in]p0Reference pressure
[in]molmassratDry air to water vapor molecular mass ratio
[in]mass_sourceMass source term
cs_ctwr_zone_t* cs_ctwr_by_id ( int  ct_id)
void cs_ctwr_define ( const char  zone_criteria[],
cs_ctwr_model_t  model,
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 
)

Define a cooling tower exchange zone.

Parameters
[in]zone_criteriaZone selection criteria
[in]modelmodel type
[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]xapLambda of the exchange law
[in]xnpExponent n of the exchange law
[in]surfaceTotal Surface of ingoing water
void cs_ctwr_field_pointer_map ( void  )

Map fields used by the cooling tower module to pointers.

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
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
void cs_ctwr_log_balance ( void  )

Perform balances in packing zones.

void cs_ctwr_log_setup ( void  )

Log Packing zone definition setup information.

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
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