OpenVSPAPI  3.20.0
Functions
CFD Mesh Functions

This group of functions is used to setup and run the CFD Mesh tool through the API.

Click here to return to the main page. More...

Functions

void SetComputationFileName (int file_type, const string &in file_name)
 
void ComputeCFDMesh (int set, int file_type)
 
void SetCFDMeshVal (int type, double val)
 
void SetCFDWakeFlag (const string &in geom_id, bool flag)
 
void DeleteAllCFDSources ()
 
void AddDefaultSources ()
 
void AddCFDSource (int type, const string &in geom_id, int surf_index, double l1, double r1, double u1, double w1, double l2=0, double r2=0, double u2=0, double w2=0)
 

Detailed Description

Function Documentation

◆ AddCFDSource()

void AddCFDSource ( int  type,
const string &in  geom_id,
int  surf_index,
double  l1,
double  r1,
double  u1,
double  w1,
double  l2 = 0,
double  r2 = 0,
double  u2 = 0,
double  w2 = 0 
)

Add a CFD Mesh default source for the indicated Geom. Note, certain input params may not be used depending on the source type

//==== Add Pod Geom ====//
pid = AddGeom( "POD", "" );
AddCFDSource( POINT_SOURCE, pid, 0, 0.25, 2.0, 0.5, 0.5 ); // Add A Point Source
See also
CFD_MESH_SOURCE_TYPE
Parameters
[in]typeCFD Mesh source type( i.e.BOX_SOURCE )
[in]geom_idGeom ID
[in]surf_indexMain surface index
[in]l1Source first edge length
[in]r1Source first radius
[in]u1Source first U location
[in]w1Source fisrt W location
[in]l2Source second edge length
[in]r2Source second radius
[in]u2Source second U location
[in]w2Source second W location

◆ AddDefaultSources()

void AddDefaultSources ( )

Add default CFD Mesh sources for all Geoms

//==== Add Pod Geom ====//
pid = AddGeom( "POD", "" );
AddDefaultSources(); // 3 Sources: Def_Fwd_PS, Def_Aft_PS, Def_Fwd_Aft_LS

◆ ComputeCFDMesh()

void ComputeCFDMesh ( int  set,
int  file_type 
)

Create a CFD Mesh for the components in the set. This analysis cannot be run through the Analysis Manager.

//==== CFDMesh Method Facet Export =====//
SetComputationFileName( CFD_FACET_TYPE, "TestCFDMeshFacet_API.facet" );
Print( "\tComputing CFDMesh..." );
See also
COMPUTATION_FILE_TYPE
Parameters
[in]setSet index (i.e. SET_ALL)
[in]file_typeCFD Mesh file type to export (supports XOR i.e CFD_SRF_TYPE & CFD_STL_TYPE)

◆ DeleteAllCFDSources()

void DeleteAllCFDSources ( )

Delete all CFD Mesh sources for all Geoms

//==== Add Pod Geom ====//
pid = AddGeom( "POD", "" );
AddCFDSource( POINT_SOURCE, pid, 0, 0.25, 2.0, 0.5, 0.5 ); // Add A Point Source

◆ SetCFDMeshVal()

void SetCFDMeshVal ( int  type,
double  val 
)

Set the value of a specific CFD Mesh option

See also
CFD_CONTROL_TYPE
Parameters
[in]typeCFD Mesh control type enum (i.e. CFD_GROWTH_RATIO)
[in]valValue to set

◆ SetCFDWakeFlag()

void SetCFDWakeFlag ( const string &in  geom_id,
bool  flag 
)

Activate or deactivate the CFD Mesh wake for a particular Geom

//==== Add Pod Geom ====//
pid = AddGeom( "POD", "" );
SetCFDWakeFlag( pid, true );
See also
CFD_CONTROL_TYPE
Parameters
[in]geom_idGeom ID
[in]flagTrue to activate, false to deactivate

◆ SetComputationFileName()

void SetComputationFileName ( int  file_type,
const string &in  file_name 
)

Get the file name of a specified file type. Note, this function cannot be used to set FEA Mesh file names.

//==== Set File Name ====//
SetComputationFileName( DEGEN_GEOM_CSV_TYPE, "TestDegenScript.csv" );
//==== Run Degen Geom ====//
See also
COMPUTATION_FILE_TYPE, SetFeaMeshFileName
Parameters
[in]file_typeFile type enum (i.e. CFD_TRI_TYPE, COMP_GEOM_TXT_TYPE)
[in]file_nameFile name
POINT_SOURCE
Definition: openvsp_as.h:1183
DeleteAllCFDSources
void DeleteAllCFDSources()
DEGEN_GEOM_CSV_TYPE
Definition: openvsp_as.h:1253
AddCFDSource
void AddCFDSource(int type, const string &in geom_id, int surf_index, double l1, double r1, double u1, double w1, double l2=0, double r2=0, double u2=0, double w2=0)
SetCFDMeshVal
void SetCFDMeshVal(int type, double val)
CFD_FACET_TYPE
Definition: openvsp_as.h:1268
SET_ALL
Definition: openvsp_as.h:1840
ComputeDegenGeom
void ComputeDegenGeom(int set, int file_type)
SetComputationFileName
void SetComputationFileName(int file_type, const string &in file_name)
CFD_MIN_EDGE_LEN
Definition: openvsp_as.h:1128
AddDefaultSources
void AddDefaultSources()
AddGeom
string AddGeom(const string &in type, const string &in parent=string())
Print
void Print(const string &in data, bool new_line=true)
ComputeCFDMesh
void ComputeCFDMesh(int set, int file_type)
SetCFDWakeFlag
void SetCFDWakeFlag(const string &in geom_id, bool flag)