OpenVSPAPI  3.20.0
Functions
FEA Mesh Functions

The following group of API functions supports all functionality of the FEA Mesh Tool. Structures, FEA Parts, materials, and properties can be defined and manipulated. Mesh and output file settings can be adjusted, and an FEA mesh can be generated.

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

Functions

int AddFeaStruct (const string &in geom_id, bool init_skin=true, int surfindex=0)
 
void DeleteFeaStruct (const string &in geom_id, int fea_struct_ind)
 
string GetFeaStructID (const string &in geom_id, int fea_struct_ind)
 
int GetFeaStructIndex (const string &in struct_id)
 
string GetFeaStructParentGeomID (const string &in struct_id)
 
string GetFeaStructName (const string &in geom_id, int fea_struct_ind)
 
void SetFeaStructName (const string &in geom_id, int fea_struct_ind, const string &in name)
 
void SetFeaPartName (const string &in part_id, const string &in name)
 
void SetFeaMeshVal (const string &in geom_id, int fea_struct_ind, int type, double val)
 
void SetFeaMeshFileName (const string &in geom_id, int fea_struct_id, int file_type, const string &in file_name)
 
void ComputeFeaMesh (const string &in geom_id, int fea_struct_ind, int file_type)
 
void ComputeFeaMesh (const string &in struct_id, int file_type)
 
string AddFeaPart (const string &in geom_id, int fea_struct_ind, int type)
 
void DeleteFeaPart (const string &in geom_id, int fea_struct_ind, const string &in part_id)
 
string AddFeaSubSurf (const string &in geom_id, int fea_struct_ind, int type)
 
void DeleteFeaSubSurf (const string &in geom_id, int fea_struct_ind, const string &in ss_id)
 
string AddFeaMaterial ()
 
string AddFeaProperty (int property_type=0)
 

Detailed Description

Function Documentation

◆ AddFeaMaterial()

string AddFeaMaterial ( )

Add an FEA Material the FEA Mesh material library. Materials are available accross all Geoms and Structures.

//==== Create FeaMaterial ====//
string mat_id = AddFeaMaterial();
SetParmVal( FindParm( mat_id, "MassDensity", "FeaMaterial" ), 0.016 );
Returns
FEA Material ID

◆ AddFeaPart()

string AddFeaPart ( const string &in  geom_id,
int  fea_struct_ind,
int  type 
)

Add an FEA Part to a Structure

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
//==== Add Bulkead ====//
string bulkhead_id = AddFeaPart( pod_id, struct_ind, FEA_SLICE );
SetParmVal( FindParm( bulkhead_id, "IncludedElements", "FeaPart" ), FEA_SHELL_AND_BEAM );
SetParmVal( FindParm( bulkhead_id, "RelCenterLocation", "FeaPart" ), 0.15 );
See also
FEA_PART_TYPE
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index
[in]typeFEA Part type enum (i.e. FEA_RIB)
Returns
FEA Part ID

◆ AddFeaProperty()

string AddFeaProperty ( int  property_type = 0)

Add aa FEA Property the FEA Mesh property library. Properties are available accross all Geoms and Structures. Currently only beam and shell properties are available. Note FEA_SHELL_AND_BEAM is not a valid property type.

//==== Create FeaProperty ====//
string prop_id = AddFeaProperty();
SetParmVal( FindParm( prop_id, "Thickness", "FeaProperty" ), 0.01 );
See also
FEA_PART_ELEMENT_TYPE
Parameters
[in]property_typeFEA Property type enum (i.e. FEA_SHELL).
Returns
FEA Property ID

◆ AddFeaStruct()

int AddFeaStruct ( const string &in  geom_id,
bool  init_skin = true,
int  surfindex = 0 
)

Add an FEA Structure to a specified Geom. Note, init_skin should ALWAYS be true.

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
Parameters
[in]geom_idParent Geom ID
[in]init_skinFlag to initialize the FEA Structure by creating an FEA Skin from the parent Geom's OML at surfindex
[in]surfindexMain surface index for the FEA Structure
Returns
FEA Structure index

◆ AddFeaSubSurf()

string AddFeaSubSurf ( const string &in  geom_id,
int  fea_struct_ind,
int  type 
)

Add an FEA SubSurface to a Structure

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
//==== Add LineArray ====//
string line_array_id = AddFeaSubSurf( pod_id, struct_ind, SS_LINE_ARRAY );
SetParmVal( FindParm( line_array_id, "ConstLineType", "SS_LineArray" ), 1 ); // Constant W
SetParmVal( FindParm( line_array_id, "Spacing", "SS_LineArray" ), 0.25 );
See also
SUBSURF_TYPE
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index
[in]typeFEA SubSurface type enum (i.e. SS_ELLIPSE)
Returns
FEA SubSurface ID

◆ ComputeFeaMesh() [1/2]

void ComputeFeaMesh ( const string &in  geom_id,
int  fea_struct_ind,
int  file_type 
)

Compute an FEA Mesh for a Structure. Only a single output file can be generated with this function.

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
struct_ind = GetFeaStructIndex( struct_id );
//==== Generate FEA Mesh and Export ====//
Print( string( "--> Generating FeaMesh " ) );
ComputeFeaMesh( parent_id, struct_ind, FEA_CALCULIX_FILE_NAME );
// Could also call ComputeFeaMesh ( struct_id, FEA_CALCULIX_FILE_NAME );
See also
SetFeaMeshFileName, FEA_EXPORT_TYPE
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index
[in]file_typeFEA output file type enum (i.e. FEA_EXPORT_TYPE)

◆ ComputeFeaMesh() [2/2]

void ComputeFeaMesh ( const string &in  struct_id,
int  file_type 
)

Compute an FEA Mesh for a Structure. Only a single output file can be generated with this function.

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
struct_ind = GetFeaStructIndex( struct_id );
//==== Generate FEA Mesh and Export ====//
Print( string( "--> Generating FeaMesh " ) );
// Could also call ComputeFeaMesh( parent_id, struct_ind, FEA_CALCULIX_FILE_NAME );
See also
SetFeaMeshFileName, FEA_EXPORT_TYPE
Parameters
[in]struct_idFEA Structure ID
[in]file_typeFEA output file type enum (i.e. FEA_EXPORT_TYPE)

◆ DeleteFeaPart()

void DeleteFeaPart ( const string &in  geom_id,
int  fea_struct_ind,
const string &in  part_id 
)

Delete an FEA Part from a Structure

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
//==== Add Bulkead ====//
string bulkhead_id = AddFeaPart( pod_id, struct_ind, FEA_SLICE );
//==== Add Fixed Point ====//
string fixed_id = AddFeaPart( pod_id, struct_ind, FEA_FIX_POINT );
//==== Delete Bulkead ====//
DeleteFeaPart( pod_id, struct_ind, bulkhead_id )
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index
[in]part_idFEA Part ID

◆ DeleteFeaStruct()

void DeleteFeaStruct ( const string &in  geom_id,
int  fea_struct_ind 
)

Delete an FEA Structure and all FEA Parts associated with it

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind_1 = AddFeaStruct( pod_id );
int struct_ind_2 = AddFeaStruct( pod_id );
DeleteFeaStruct( pod_id, struct_ind_1 );
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index

◆ DeleteFeaSubSurf()

void DeleteFeaSubSurf ( const string &in  geom_id,
int  fea_struct_ind,
const string &in  ss_id 
)

Delete an FEA SubSurface from a Structure

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
//==== Add LineArray ====//
string line_array_id = AddFeaSubSurf( pod_id, struct_ind, SS_LINE_ARRAY );
//==== Add Rectangle ====//
string rect_id = AddFeaSubSurf( pod_id, struct_ind, SS_RECTANGLE );
//==== Delete LineArray ====//
DeleteFeaSubSurf( pod_id, struct_ind, line_array_id )
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index
[in]ss_idFEA SubSurface ID

◆ GetFeaStructID()

string GetFeaStructID ( const string &in  geom_id,
int  fea_struct_ind 
)

Get the ID of an FEA Structure

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
string struct_id = GetFeaStructID( pod_id, struct_ind );
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index
Returns
FEA Structure ID

◆ GetFeaStructIndex()

int GetFeaStructIndex ( const string &in  struct_id)

Get the index of an FEA Structure in its Parent Geom's Structure vector

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind_1 = AddFeaStruct( pod_id );
int struct_ind_2 = AddFeaStruct( pod_id );
string struct_id_2 = GetFeaStructID( pod_id, struct_ind_2 );
DeleteFeaStruct( pod_id, struct_ind_1 );
int struct_ind_2_new = GetFeaStructIndex( struct_id_2 )
Parameters
[in]struct_idFEA Structure ID
Returns
FEA Structure index

◆ GetFeaStructName()

string GetFeaStructName ( const string &in  geom_id,
int  fea_struct_ind 
)

Get the name of an FEA Structure. The FEA Structure name functions as the the Parm Container name

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
//==== Get Structure Name ====//
string parm_container_name = GetFeaStructName( pod_id, struct_ind );
string display_name = string("Current Structure Parm Container Name: ") + parm_container_name + string("\n");
Print( display_name );
See also
FindContainer, SetFeaStructName
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index
Returns
Name for the FEA Structure

◆ GetFeaStructParentGeomID()

string GetFeaStructParentGeomID ( const string &in  struct_id)

Get the Parent Geom ID for an FEA Structure

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
string struct_id = GetFeaStructID( pod_id, struct_ind );
//==== Get Parent Geom ID and Index ====//
string parent_id = GetFeaStructParentGeomID( struct_id );
Parameters
[in]struct_idFEA Structure ID
Returns
Parent Geom ID

◆ SetFeaMeshFileName()

void SetFeaMeshFileName ( const string &in  geom_id,
int  fea_struct_id,
int  file_type,
const string &in  file_name 
)

Set the name of a particular FEA Mesh output file for a specified Structure

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
struct_ind = GetFeaStructIndex( struct_id );
//=== Set Export File Name ===//
string export_name = "FEAMeshTest_calculix.dat";
SetFeaMeshFileName( parent_id, struct_ind, FEA_CALCULIX_FILE_NAME, export_name );
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_idFEA Structure index
[in]file_typeFEA output file type enum (i.e. FEA_EXPORT_TYPE)
[in]file_nameName for the output file

◆ SetFeaMeshVal()

void SetFeaMeshVal ( const string &in  geom_id,
int  fea_struct_ind,
int  type,
double  val 
)

Set the value of a particular FEA Mesh option for the specified Structure. Note, FEA Mesh makes use of enums initially created for CFD Mesh but not all CFD Mesh options are available for FEA Mesh.

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
//==== Adjust FeaMeshSettings ====//
SetFeaMeshVal( pod_id, struct_ind, CFD_MAX_EDGE_LEN, 0.75 );
SetFeaMeshVal( pod_id, struct_ind, CFD_MIN_EDGE_LEN, 0.2 );
See also
CFD_CONTROL_TYPE
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index
[in]typeFEA Mesh option type enum (i.e. CFD_MAX_EDGE_LEN)
[in]valValue the option is set to

◆ SetFeaPartName()

void SetFeaPartName ( const string &in  part_id,
const string &in  name 
)

Set the name of an FEA Part

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
//==== Add Bulkead ====//
string bulkhead_id = AddFeaPart( pod_id, struct_ind, FEA_SLICE );
SetFeaPartName( bulkhead_id, "Bulkhead" );
Parameters
[in]part_idFEA Part ID
[in]nameNew name for the FEA Part

◆ SetFeaStructName()

void SetFeaStructName ( const string &in  geom_id,
int  fea_struct_ind,
const string &in  name 
)

Set the name of an FEA Structure

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
//==== Change the Structure Name ====//
SetFeaStructName( pod_id, struct_ind, "Example_Struct" );
parm_container_id = FindContainer( "Example_Struct", struct_ind );
display_id = string("New Structure Parm Container ID: ") + parm_container_id + string("\n");
Print( display_id );
Parameters
[in]geom_idParent Geom ID
[in]fea_struct_indFEA Structure index
[in]namenew name for the FEA Structure
DeleteFeaSubSurf
void DeleteFeaSubSurf(const string &in geom_id, int fea_struct_ind, const string &in ss_id)
GetFeaStructID
string GetFeaStructID(const string &in geom_id, int fea_struct_ind)
AddFeaProperty
string AddFeaProperty(int property_type=0)
SS_LINE_ARRAY
Definition: openvsp_as.h:1888
FEA_FIX_POINT
Definition: openvsp_as.h:1459
FEA_SHELL_AND_BEAM
Definition: openvsp_as.h:1447
DeleteFeaStruct
void DeleteFeaStruct(const string &in geom_id, int fea_struct_ind)
DeleteFeaPart
void DeleteFeaPart(const string &in geom_id, int fea_struct_ind, const string &in part_id)
SetFeaStructName
void SetFeaStructName(const string &in geom_id, int fea_struct_ind, const string &in name)
FEA_SLICE
Definition: openvsp_as.h:1456
SetFeaMeshFileName
void SetFeaMeshFileName(const string &in geom_id, int fea_struct_id, int file_type, const string &in file_name)
AddFeaMaterial
string AddFeaMaterial()
FindParm
string FindParm(const string &in parm_container_id, const string &in parm_name, const string &in group_name)
GetFeaStructName
string GetFeaStructName(const string &in geom_id, int fea_struct_ind)
SetFeaMeshVal
void SetFeaMeshVal(const string &in geom_id, int fea_struct_ind, int type, double val)
GetFeaStructIndex
int GetFeaStructIndex(const string &in struct_id)
SS_RECTANGLE
Definition: openvsp_as.h:1885
AddFeaSubSurf
string AddFeaSubSurf(const string &in geom_id, int fea_struct_ind, int type)
SetParmVal
double SetParmVal(const string &in parm_id, double val)
AddFeaPart
string AddFeaPart(const string &in geom_id, int fea_struct_ind, int type)
string
AngelScript ScriptExtension for representing the C++ std::string.
Definition: openvsp_as.h:185
FindContainer
string FindContainer(const string &in name, int index)
CFD_MIN_EDGE_LEN
Definition: openvsp_as.h:1128
GetFeaStructParentGeomID
string GetFeaStructParentGeomID(const string &in struct_id)
AddGeom
string AddGeom(const string &in type, const string &in parent=string())
CFD_MAX_EDGE_LEN
Definition: openvsp_as.h:1129
Print
void Print(const string &in data, bool new_line=true)
SetFeaPartName
void SetFeaPartName(const string &in part_id, const string &in name)
FEA_CALCULIX_FILE_NAME
Definition: openvsp_as.h:1430
AddFeaStruct
int AddFeaStruct(const string &in geom_id, bool init_skin=true, int surfindex=0)
ComputeFeaMesh
void ComputeFeaMesh(const string &in geom_id, int fea_struct_ind, int file_type)