OpenVSPAPI  3.23.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)
 
void SetFeaMeshStructIndex (int struct_index)
 
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)
 
string[] GetFeaStructIDVec ()
 
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 GetFeaPartID (const string &in fea_struct_id, int fea_part_index)
 
string GetFeaPartName (const string &in part_id)
 
int GetFeaPartType (const string &in part_id)
 
int GetFeaSubSurfIndex (const string &in ss_id)
 
int NumFeaStructures ()
 
int NumFeaParts (const string &in fea_struct_id)
 
int NumFeaSubSurfs (const string &in fea_struct_id)
 
string[] GetFeaPartIDVec (const string &in fea_struct_id)
 
string[] GetFeaSubSurfIDVec (const string &in fea_struct_id)
 
void SetFeaPartPerpendicularSparID (const string &in part_id, const string &in perpendicular_spar_id)
 
string GetFeaPartPerpendicularSparID (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

Warning
init_skin should ALWAYS be set to 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 and FEA SubSurfaces 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

◆ GetFeaPartID()

string GetFeaPartID ( const string &in  fea_struct_id,
int  fea_part_index 
)

Get the Parm ID of an FEA Part, identified from a FEA Structure Parm ID and FEA Part index.

//==== 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 )
//==== Add Bulkead ====//
string bulkhead_id = AddFeaPart( pod_id, struct_ind, FEA_SLICE );
if ( bulkhead_id != GetFeaPartID( struct_id, 0 ) ) // These should be equivalent
{
Print( "Error: GetFeaPartID" );
}
Parameters
[in]fea_struct_idFEA Structure ID
[in]fea_part_indexFEA Part index
Returns
FEA Part ID

◆ GetFeaPartIDVec()

string [] GetFeaPartIDVec ( const string &in  fea_struct_id)

Get the IDs of all FEA Parts in the given FEA Structure

//==== Add Geometries ====//
string pod_id = AddGeom( "POD" );
string struct_id = GetFeaStructID( pod_id, struct_ind )
//==== Add FEA Parts ====//
string slice_id = AddFeaPart( pod_id, struct_ind, FEA_SLICE );
string dome_id = AddFeaPart( pod_id, struct_ind, FEA_DOME );
array < string > part_id_vec = GetFeaPartIDVec( struct_id ); // Should include slice_id & dome_id
See also
NumFeaParts
Parameters
[in]fea_struct_idFEA Structure ID
Returns
Array of FEA Part IDs

◆ GetFeaPartName()

string GetFeaPartName ( const string &in  part_id)

Get the name of an FEA Part

//==== Add Fuselage Geometry ====//
string fuse_id = AddGeom( "FUSELAGE" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( fuse_id );
//==== Add Bulkead ====//
string bulkhead_id = AddFeaPart( fuse_id, struct_ind, FEA_SLICE );
string name = "example_name";
SetFeaPartName( bulkhead_id, name ;
if ( name != GetFeaPartName( bulkhead_id ) ) // These should be equivalent
{
Print( "Error: GetFeaPartName" );
}
See also
SetFeaPartName
Parameters
[in]part_idFEA Part ID
Returns
FEA Part name

◆ GetFeaPartPerpendicularSparID()

string GetFeaPartPerpendicularSparID ( const string &in  part_id)

Get the ID of the perpendicular spar for an FEA Rib or Rib Array. Note, the FEA Rib or Rib Array doesn't have to have "SPAR_NORMAL" set for the "PerpendicularEdgeType" Parm for this function to still return a value.

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING" );
//==== Add FeaStructure to Wing ====//
int struct_ind = AddFeaStruct( wing_id );
//==== Add Rib ====//
string rib_id = AddFeaPart( wing_id, struct_ind, FEA_RIB );
//==== Add Spars ====//
string spar_id_1 = AddFeaPart( wing_id, struct_ind, FEA_SPAR );
string spar_id_2 = AddFeaPart( wing_id, struct_ind, FEA_SPAR );
SetParmVal( FindParm( spar_id_1, "RelCenterLocation", "FeaPart" ), 0.25 );
SetParmVal( FindParm( spar_id_2, "RelCenterLocation", "FeaPart" ), 0.75 );
//==== Set Perpendicular Edge type to SPAR ====//
SetParmVal( FindParm( rib_id, "PerpendicularEdgeType", "FeaRib" ), SPAR_NORMAL );
SetFeaPartPerpendicularSparID( rib_id, spar_id_2 );
if ( spar_id_2 != GetFeaPartPerpendicularSparID( rib_id ) )
{
Print( "Error: GetFeaPartPerpendicularSparID" );
}
See also
FEA_RIB_NORMAL, SetFeaPartPerpendicularSparID
Parameters
[in]part_idFEA Part ID (Rib or Rib Array Type)
Returns
Perpendicular FEA Spar ID

◆ GetFeaPartType()

int GetFeaPartType ( const string &in  part_id)

Get the type of an FEA Part

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
//==== Add Slice ====//
string slice_id = AddFeaPart( pod_id, struct_ind, FEA_SLICE );
if ( FEA_SLICE != GetFeaPartType( slice_id ) ) // These should be equivalent
{
Print( "Error: GetFeaPartType" );
}
See also
FEA_PART_TYPE
Parameters
[in]part_idFEA Part ID
Returns
FEA Part type enum

◆ 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

◆ GetFeaStructIDVec()

string [] GetFeaStructIDVec ( )

Get the IDs of all FEA Structures in the vehicle

//==== Add Geometries ====//
string pod_id = AddGeom( "POD" );
string wing_id = AddGeom( "WING" );
//==== Add FeaStructures ====//
int pod_struct_ind = AddFeaStruct( pod_id );
int wing_struct_ind = AddFeaStruct( wing_id );
See also
NumFeaStructures
Returns
Array of FEA Structure IDs

◆ GetFeaStructIndex()

int GetFeaStructIndex ( const string &in  struct_id)

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

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

◆ GetFeaSubSurfIDVec()

string [] GetFeaSubSurfIDVec ( const string &in  fea_struct_id)

Get the IDs of all FEA SubSurfaces in the given FEA Structure

//==== Add Geometries ====//
string pod_id = AddGeom( "POD" );
string struct_id = GetFeaStructID( pod_id, struct_ind )
//==== Add SubSurfaces ====//
string line_array_id = AddFeaSubSurf( wing_id, struct_ind, SS_LINE_ARRAY );
string rectangle_id = AddFeaSubSurf( wing_id, struct_ind, SS_RECTANGLE );
array < string > part_id_vec = GetFeaSubSurfIDVec( struct_id ); // Should include line_array_id & rectangle_id
See also
NumFeaSubSurfs
Parameters
[in]fea_struct_idFEA Structure ID
Returns
Array of FEA Part IDs

◆ GetFeaSubSurfIndex()

int GetFeaSubSurfIndex ( const string &in  ss_id)

Get the index of an FEA SubSurface give the SubSurface ID

//==== 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 );
if ( SS_LINE_ARRAY != GetFeaSubSurfIndex( line_array_id ) ) // These should be equivalent
{
Print( "Error: GetFeaSubSurfIndex" );
}
Parameters
[in]ss_idFEA SubSurface ID
Returns
FEA SubSurface Index

◆ NumFeaParts()

int NumFeaParts ( const string &in  fea_struct_id)

Get the number of FEA Parts for a particular 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 )
//==== Add FEA Parts ====//
string slice_id = AddFeaPart( pod_id, struct_ind, FEA_SLICE );
string dome_id = AddFeaPart( pod_id, struct_ind, FEA_DOME );
if ( NumFeaParts( struct_id ) != 2 )
{
Print( "Error: NumFeaSubSurfs" );
}
See also
GetFeaPartIDVec
Parameters
[in]fea_struct_idFEA Structure ID
Returns
Number of FEA Parts

◆ NumFeaStructures()

int NumFeaStructures ( )

Get the total number of FEA Subsurfaces in the vehicle

//==== Add Pod Geometry ====//
string wing_id = AddGeom( "WING" );
//==== Add FeaStructure to Pod ====//
int struct_1 = AddFeaStruct( wing_id );
int struct_2 = AddFeaStruct( wing_id );
if ( NumFeaStructures() != 2 )
{
Print( "Error: NumFeaStructures" );
}
See also
GetFeaStructIDVec
Returns
Total Number of FEA Structures

◆ NumFeaSubSurfs()

int NumFeaSubSurfs ( const string &in  fea_struct_id)

Get the number of FEA Subsurfaces for a particular FEA Structure

//==== Add Pod Geometry ====//
string wing_id = AddGeom( "WING" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( wing_id );
string struct_id = GetFeaStructID( wing_id, struct_ind )
//==== Add SubSurfaces ====//
string line_array_id = AddFeaSubSurf( wing_id, struct_ind, SS_LINE_ARRAY );
string rectangle_id = AddFeaSubSurf( wing_id, struct_ind, SS_RECTANGLE );
if ( NumFeaSubSurfs( struct_id ) != 2 )
{
Print( "Error: NumFeaSubSurfs" );
}
See also
GetFeaSubSurfIDVec
Parameters
[in]fea_struct_idFEA Structure ID
Returns
Number of FEA SubSurfaces

◆ 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

◆ SetFeaMeshStructIndex()

void SetFeaMeshStructIndex ( int  struct_index)

Sets FeaMeshMgr m_FeaMeshStructIndex member using passed in index of a FeaStructure

//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
SetFeaMeshStructIndex( struct_ind );
if ( FindGeoms().size() != 0 ) { Print( "ERROR: VSPRenew" ); }

◆ 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" );
See also
GetFeaPartName
Parameters
[in]part_idFEA Part ID
[in]nameNew name for the FEA Part

◆ SetFeaPartPerpendicularSparID()

void SetFeaPartPerpendicularSparID ( const string &in  part_id,
const string &in  perpendicular_spar_id 
)

Set the ID of the perpendicular spar for an FEA Rib or Rib Array. Note, the FEA Rib or Rib Array should have "SPAR_NORMAL" set for the "PerpendicularEdgeType" Parm. If it is not, the ID will still be set, but the orientation of the Rib or Rib Array will not change.

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING" );
//==== Add FeaStructure to Wing ====//
int struct_ind = AddFeaStruct( wing_id );
//==== Add Rib ====//
string rib_id = AddFeaPart( wing_id, struct_ind, FEA_RIB );
//==== Add Spars ====//
string spar_id_1 = AddFeaPart( wing_id, struct_ind, FEA_SPAR );
string spar_id_2 = AddFeaPart( wing_id, struct_ind, FEA_SPAR );
SetParmVal( FindParm( spar_id_1, "RelCenterLocation", "FeaPart" ), 0.25 );
SetParmVal( FindParm( spar_id_2, "RelCenterLocation", "FeaPart" ), 0.75 );
//==== Set Perpendicular Edge type to SPAR ====//
SetParmVal( FindParm( rib_id, "PerpendicularEdgeType", "FeaRib" ), SPAR_NORMAL );
SetFeaPartPerpendicularSparID( rib_id, spar_id_2 );
if ( spar_id_2 != GetFeaPartPerpendicularSparID( rib_id ) )
{
Print( "Error: SetFeaPartPerpendicularSparID" );
}
See also
FEA_RIB_NORMAL, GetFeaPartPerpendicularSparID
Parameters
[in]part_idFEA Part ID (Rib or Rib Array Type)
[in]perpendicular_spar_idFEA Spar ID

◆ 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 );
See also
GetFeaStructName
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)
SPAR_NORMAL
@ SPAR_NORMAL
Definition: openvsp_as.h:1487
FindGeoms
string[] FindGeoms()
SS_LINE_ARRAY
@ SS_LINE_ARRAY
Definition: openvsp_as.h:1928
FEA_FIX_POINT
@ FEA_FIX_POINT
Definition: openvsp_as.h:1470
FEA_SHELL_AND_BEAM
@ FEA_SHELL_AND_BEAM
Definition: openvsp_as.h:1458
DeleteFeaStruct
void DeleteFeaStruct(const string &in geom_id, int fea_struct_ind)
GetFeaPartID
string GetFeaPartID(const string &in fea_struct_id, int fea_part_index)
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)
GetFeaSubSurfIndex
int GetFeaSubSurfIndex(const string &in ss_id)
FEA_SLICE
@ FEA_SLICE
Definition: openvsp_as.h:1467
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)
GetFeaSubSurfIDVec
string[] GetFeaSubSurfIDVec(const string &in fea_struct_id)
FEA_RIB
@ FEA_RIB
Definition: openvsp_as.h:1468
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
@ SS_RECTANGLE
Definition: openvsp_as.h:1925
AddFeaSubSurf
string AddFeaSubSurf(const string &in geom_id, int fea_struct_ind, int type)
SetParmVal
double SetParmVal(const string &in parm_id, double val)
GetFeaPartType
int GetFeaPartType(const string &in part_id)
AddFeaPart
string AddFeaPart(const string &in geom_id, int fea_struct_ind, int type)
SetFeaPartPerpendicularSparID
void SetFeaPartPerpendicularSparID(const string &in part_id, const string &in perpendicular_spar_id)
NumFeaSubSurfs
int NumFeaSubSurfs(const string &in fea_struct_id)
string
AngelScript ScriptExtension for representing the C++ std::string.
Definition: openvsp_as.h:193
FindContainer
string FindContainer(const string &in name, int index)
CFD_MIN_EDGE_LEN
@ CFD_MIN_EDGE_LEN
Definition: openvsp_as.h:1136
array
AngelScript ScriptExtension for representing the C++ std::vector.
Definition: openvsp_as.h:252
NumFeaParts
int NumFeaParts(const string &in fea_struct_id)
FEA_SPAR
@ FEA_SPAR
Definition: openvsp_as.h:1469
Update
void Update(bool update_managers=true)
GetFeaStructParentGeomID
string GetFeaStructParentGeomID(const string &in struct_id)
GetFeaPartName
string GetFeaPartName(const string &in part_id)
AddGeom
string AddGeom(const string &in type, const string &in parent=string())
FEA_DOME
@ FEA_DOME
Definition: openvsp_as.h:1471
NumFeaStructures
int NumFeaStructures()
CFD_MAX_EDGE_LEN
@ CFD_MAX_EDGE_LEN
Definition: openvsp_as.h:1137
Print
void Print(const string &in data, bool new_line=true)
GetFeaStructIDVec
string[] GetFeaStructIDVec()
SetFeaMeshStructIndex
void SetFeaMeshStructIndex(int struct_index)
SetFeaPartName
void SetFeaPartName(const string &in part_id, const string &in name)
FEA_CALCULIX_FILE_NAME
@ FEA_CALCULIX_FILE_NAME
Definition: openvsp_as.h:1439
GetFeaPartPerpendicularSparID
string GetFeaPartPerpendicularSparID(const string &in part_id)
GetFeaPartIDVec
string[] GetFeaPartIDVec(const string &in fea_struct_id)
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)