programmer's documentation
Functions
cs_fan.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_mem.h"
#include "cs_base.h"
#include "cs_fan.h"
Include dependency graph for cs_fan.c:

Functions

void tstvtl (cs_lnum_t *const nbrvtl)
 
void defvtl (const cs_int_t *dimmod, const cs_int_t *dimvtl, const cs_real_t xyzvt1[3], const cs_real_t xyzvt2[3], const cs_real_t *rvvt, const cs_real_t *rpvt, const cs_real_t *rmvt, const cs_real_t ccarac[3], const cs_real_t *tauvt)
 
void inivtl (void)
 
void numvtl (cs_int_t indic[])
 
void debvtl (cs_real_t flumas[], cs_real_t flumab[], cs_real_t rho[], cs_real_t rhofab[], cs_real_t debent[], cs_real_t debsor[])
 
void tsvvtl (cs_int_t *idimts, cs_real_t crvexp[])
 
void cs_fan_define (int model_dim, int fan_dim, const cs_real_t inlet_axis_coords[3], const cs_real_t outlet_axis_coords[3], cs_real_t fan_radius, cs_real_t blades_radius, cs_real_t hub_radius, const cs_real_t curve_coeffs[3], cs_real_t axial_torque)
 Fan definition (added to the ones previously defined) More...
 
void cs_fan_destroy_all (void)
 Destroy the structures associated with fans. More...
 
void cs_fan_build_all (const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities)
 Define the cells belonging to the different fans. More...
 
void cs_fan_compute_flows (const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities, const cs_real_t i_mass_flux[], const cs_real_t b_mass_flux[], const cs_real_t c_rho[], const cs_real_t b_rho[])
 Compute the flows through the fans. More...
 
void cs_fan_compute_force (const cs_mesh_quantities_t *mesh_quantities, int source_coo_id, cs_real_t source_t[])
 Compute the force induced by the fans (needs a previous calculation of the flows through each fan). More...
 

Detailed Description

Fan modeling through velocity source terms.

Function Documentation

◆ cs_fan_build_all()

void cs_fan_build_all ( const cs_mesh_t mesh,
const cs_mesh_quantities_t mesh_quantities 
)

Define the cells belonging to the different fans.

Parameters
[in]meshassociated mesh structure
[in]mesh_quantitiesmesh quantities

◆ cs_fan_compute_flows()

void cs_fan_compute_flows ( const cs_mesh_t mesh,
const cs_mesh_quantities_t mesh_quantities,
const cs_real_t  i_mass_flux[],
const cs_real_t  b_mass_flux[],
const cs_real_t  c_rho[],
const cs_real_t  b_rho[] 
)

Compute the flows through the fans.

Parameters
[in]meshmesh structure
[in]mesh_quantitiesmesh quantities
[in]i_mass_fluxinterior faces mass flux
[in]b_mass_fluxboundary faces mass flux
[in]c_rhodensity at cells
[in]b_rhodensity at boundary faces

◆ cs_fan_compute_force()

void cs_fan_compute_force ( const cs_mesh_quantities_t mesh_quantities,
int  source_coo_id,
cs_real_t  source_t[] 
)

Compute the force induced by the fans (needs a previous calculation of the flows through each fan).

Parameters
[in]mesh_quantitiesmesh quantities
[in]source_coo_idcoordinate associated to the source term of velocity (0: X; 0: Y; 0: Z)
[in]source_texplicit source term for the velocity

◆ cs_fan_define()

void cs_fan_define ( int  model_dim,
int  fan_dim,
const cs_real_t  inlet_axis_coords[3],
const cs_real_t  outlet_axis_coords[3],
cs_real_t  fan_radius,
cs_real_t  blades_radius,
cs_real_t  hub_radius,
const cs_real_t  curve_coeffs[3],
cs_real_t  axial_torque 
)

Fan definition (added to the ones previously defined)

Parameters
[in]model_dimfan model dimension: 1: constant_f 2: force_profile 3: force_profile + tangential couple
[in]fan_dimfan dimension: 2: pseudo-2D (extruded mesh) 3: 3D (standard)
[in]inlet_axis_coordsintersection coords. of axis and inlet face
[in]outlet_axis_coordsintersection coords. od axis and outlet face
[in]fan_radiusfan radius
[in]blades_radiusblades radius
[in]hub_radiushub radius
[in]curve_coeffscoefficients of degre 0, 1 and 2 of the characteristic curve
[in]axial_torquefan axial torque

◆ cs_fan_destroy_all()

void cs_fan_destroy_all ( void  )

Destroy the structures associated with fans.

◆ debvtl()

void debvtl ( cs_real_t  flumas[],
cs_real_t  flumab[],
cs_real_t  rho[],
cs_real_t  rhofab[],
cs_real_t  debent[],
cs_real_t  debsor[] 
)

◆ defvtl()

void defvtl ( const cs_int_t dimmod,
const cs_int_t dimvtl,
const cs_real_t  xyzvt1[3],
const cs_real_t  xyzvt2[3],
const cs_real_t rvvt,
const cs_real_t rpvt,
const cs_real_t rmvt,
const cs_real_t  ccarac[3],
const cs_real_t tauvt 
)

◆ inivtl()

void inivtl ( void  )

◆ numvtl()

void numvtl ( cs_int_t  indic[])

◆ tstvtl()

void tstvtl ( cs_lnum_t *const  nbrvtl)

◆ tsvvtl()

void tsvvtl ( cs_int_t idimts,
cs_real_t  crvexp[] 
)