OpenVSP API Documentation 3.50.0
Loading...
Searching...
No Matches
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 vsp::AddFeaStruct (const std::string &geom_id, bool init_skin=true, int surfindex=0)
void vsp::SetFeaMeshStructIndex (int struct_index)
void vsp::DeleteFeaStruct (const std::string &geom_id, int fea_struct_ind)
std::string vsp::GetFeaStructID (const std::string &geom_id, int fea_struct_ind)
int vsp::GetFeaStructIndex (const std::string &struct_id)
std::string vsp::GetFeaStructParentGeomID (const std::string &struct_id)
std::string vsp::GetFeaStructName (const std::string &geom_id, int fea_struct_ind)
void vsp::SetFeaStructName (const std::string &geom_id, int fea_struct_ind, const std::string &name)
std::vector< std::string > vsp::GetFeaStructIDVec ()
void vsp::SetFeaPartName (const std::string &part_id, const std::string &name)
std::string vsp::AddFeaPart (const std::string &geom_id, int fea_struct_ind, int type)
void vsp::DeleteFeaPart (const std::string &geom_id, int fea_struct_ind, const std::string &part_id)
std::string vsp::GetFeaPartID (const std::string &fea_struct_id, int fea_part_index)
std::string vsp::GetFeaPartName (const std::string &part_id)
int vsp::GetFeaPartType (const std::string &part_id)
std::vector< std::string > vsp::GetFeaPartIDVec (const std::string &fea_struct_id)
std::vector< std::string > vsp::GetFeaSubSurfIDVec (const std::string &fea_struct_id)
void vsp::SetFeaPartPerpendicularSparID (const std::string &part_id, const std::string &perpendicular_spar_id)
std::string vsp::GetFeaPartPerpendicularSparID (const std::string &part_id)
void vsp::SetFeaSubSurfName (const std::string &subsurf_id, const std::string &name)
std::string vsp::GetFeaSubSurfName (const std::string &subsurf_id)
std::string vsp::AddFeaSubSurf (const std::string &geom_id, int fea_struct_ind, int type)
void vsp::DeleteFeaSubSurf (const std::string &geom_id, int fea_struct_ind, const std::string &ss_id)
int vsp::GetFeaSubSurfIndex (const string &ss_id)
int vsp::GetFeaPolySparNumPt (const string &pspar_id)
string vsp::AddFeaPolySparPt (const string &pspar_id)
string vsp::InsertFeaPolySparPt (const string &pspar_id, int index)
void vsp::DelFeaPolySparPt (const string &pspar_id, int index)
void vsp::DelAllFeaPolySparPt (const string &pspar_id)
int vsp::MoveFeaPolySparPt (const string &pspar_id, int index, int reorder_type)
void vsp::SetFeaPolySparPtName (const string &pspar_id, int index, const string &name)
string vsp::GetFeaPolySparPtName (const string &pspar_id, int index)
string vsp::GetFeaPolySparPtID (const string &pspar_id, int index)
vector< string > vsp::GetAllFeaPolySparPtIDVec (const string &pspar_id)
int vsp::NumFeaStructures ()
int vsp::NumFeaParts (const std::string &fea_struct_id)
int vsp::NumFeaSubSurfs (const std::string &fea_struct_id)
std::string vsp::AddFeaBC (const string &fea_struct_id, int type=-1)
void vsp::DelFeaBC (const string &fea_struct_id, const std::string &bc_id)
std::vector< std::string > vsp::GetFeaBCIDVec (const string &fea_struct_id)
int vsp::NumFeaBCs (const string &fea_struct_id)
std::string vsp::AddFeaMaterial ()
std::string vsp::AddFeaProperty (int property_type=0)
void vsp::SetFeaMeshVal (const std::string &geom_id, int fea_struct_ind, int type, double val)
void vsp::SetFeaMeshFileName (const std::string &geom_id, int fea_struct_ind, int file_type, const string &file_name)
void vsp::ComputeFeaMesh (const std::string &geom_id, int fea_struct_ind, int file_type)
void vsp::ComputeFeaMesh (const std::string &struct_id, int file_type)

Detailed Description

Function Documentation

◆ AddFeaBC()

std::string vsp::AddFeaBC ( const string & fea_struct_id,
int type = -1 )
extern

Add an FEA BC to a 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 BC ====//
string bc_id = AddFeaBC( struct_id, FEA_BC_STRUCTURE );
@ FEA_BC_STRUCTURE
Definition APIDefines.h:602
std::string AddFeaBC(const string &fea_struct_id, int type=-1)
int AddFeaStruct(const std::string &geom_id, bool init_skin=true, int surfindex=0)
std::string GetFeaStructID(const std::string &geom_id, int fea_struct_ind)
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
See also
FEA_BC_TYPE
Parameters
[in]fea_struct_idstring FEA Structure ID
[in]typeint FEA BC type enum ( i.e. FEA_BC_STRUCTURE )
Returns
string FEA BC ID

◆ AddFeaMaterial()

std::string vsp::AddFeaMaterial ( )
extern

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

//==== Create FeaMaterial ====//
string mat_id = AddFeaMaterial();
SetParmVal( FindParm( mat_id, "MassDensity", "FeaMaterial" ), 0.016 );
std::string AddFeaMaterial()
std::string FindParm(const std::string &parm_container_id, const std::string &parm_name, const std::string &group_name)
double SetParmVal(const std::string &parm_id, double val)
Returns
string FEA Material ID

◆ AddFeaPart()

std::string vsp::AddFeaPart ( const std::string & geom_id,
int fea_struct_ind,
int type )
extern

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 );
@ FEA_SLICE
Definition APIDefines.h:698
@ FEA_SHELL_AND_BEAM
Definition APIDefines.h:689
std::string AddFeaPart(const std::string &geom_id, int fea_struct_ind, int type)
See also
FEA_PART_TYPE
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
[in]typeint FEA Part type enum (i.e. FEA_RIB)
Returns
string FEA Part ID

◆ AddFeaPolySparPt()

string vsp::AddFeaPolySparPt ( const string & pspar_id)
extern

Add a point to the end of an FEA Poly Spar and return its ID. The new point is appended after all existing points.

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
string pt_id = AddFeaPolySparPt( pspar_id );
if ( GetFeaPolySparNumPt( pspar_id ) != 3 )
{
Print( "Error: AddFeaPolySparPt" );
}
@ FEA_POLY_SPAR
Definition APIDefines.h:707
int GetFeaPolySparNumPt(const string &pspar_id)
string AddFeaPolySparPt(const string &pspar_id)
See also
InsertFeaPolySparPt, DelFeaPolySparPt, GetFeaPolySparNumPt
Parameters
[in]pspar_idstring FEA Poly Spar part ID
Returns
string ID of the newly added Poly Spar point

◆ AddFeaProperty()

std::string vsp::AddFeaProperty ( int property_type = 0)
extern

Add aa FEA Property the FEA Mesh property library. Properties are available across 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 );
std::string AddFeaProperty(int property_type=0)
See also
FEA_PART_ELEMENT_TYPE
Parameters
[in]property_typeint FEA Property type enum (i.e. FEA_SHELL).
Returns
string FEA Property ID

◆ AddFeaStruct()

int vsp::AddFeaStruct ( const std::string & geom_id,
bool init_skin = true,
int surfindex = 0 )
extern

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_idstring Parent Geom ID
[in]init_skinbool Flag to initialize the FEA Structure by creating an FEA Skin from the parent Geom's OML at surfindex
[in]surfindexint Main surface index for the FEA Structure
Returns
int FEA Structure index

◆ AddFeaSubSurf()

std::string vsp::AddFeaSubSurf ( const std::string & geom_id,
int fea_struct_ind,
int type )
extern

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 );
@ SS_LINE_ARRAY
std::string AddFeaSubSurf(const std::string &geom_id, int fea_struct_ind, int type)
See also
SUBSURF_TYPE
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
[in]typeint FEA SubSurface type enum (i.e. SS_ELLIPSE)
Returns
string FEA SubSurface ID

◆ ComputeFeaMesh() [1/2]

void vsp::ComputeFeaMesh ( const std::string & geom_id,
int fea_struct_ind,
int file_type )
extern

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 );
string struct_id = GetFeaStructID( pod_id, struct_ind );
//==== Generate FEA Mesh and Export ====//
Print( string( "--> Generating FeaMesh " ) );
//==== Get Parent Geom ID and Index ====//
string parent_id = GetFeaStructParentGeomID( struct_id ); // same as pod_id
ComputeFeaMesh( parent_id, struct_ind, FEA_CALCULIX_FILE_NAME );
// Could also call ComputeFeaMesh ( struct_id, FEA_CALCULIX_FILE_NAME );
@ FEA_CALCULIX_FILE_NAME
Definition APIDefines.h:627
std::string GetFeaStructParentGeomID(const std::string &struct_id)
void ComputeFeaMesh(const std::string &geom_id, int fea_struct_ind, int file_type)
See also
SetFeaMeshFileName, FEA_EXPORT_TYPE
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
[in]file_typeint FEA output file type enum (i.e. FEA_EXPORT_TYPE)

◆ ComputeFeaMesh() [2/2]

void vsp::ComputeFeaMesh ( const std::string & struct_id,
int file_type )
extern

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 );
string struct_id = GetFeaStructID( pod_id, struct_ind );
//==== Generate FEA Mesh and Export ====//
Print( string( "--> Generating FeaMesh " ) );
//==== Get Parent Geom ID and Index ====//
string parent_id = GetFeaStructParentGeomID( struct_id ); // same as pod_id
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]struct_idstring FEA Structure index
[in]file_typeint FEA output file type enum (i.e. FEA_EXPORT_TYPE)

◆ DelAllFeaPolySparPt()

void vsp::DelAllFeaPolySparPt ( const string & pspar_id)
extern

Delete all points from an FEA Poly Spar.

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
AddFeaPolySparPt( pspar_id );
AddFeaPolySparPt( pspar_id );
DelAllFeaPolySparPt( pspar_id );
if ( GetFeaPolySparNumPt( pspar_id ) != 0 )
{
Print( "Error: DelAllFeaPolySparPt" );
}
void DelAllFeaPolySparPt(const string &pspar_id)
See also
DelFeaPolySparPt, AddFeaPolySparPt, GetFeaPolySparNumPt
Parameters
[in]pspar_idstring FEA Poly Spar part ID

◆ DeleteFeaPart()

void vsp::DeleteFeaPart ( const std::string & geom_id,
int fea_struct_ind,
const std::string & part_id )
extern

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 );
@ FEA_FIX_POINT
Definition APIDefines.h:701
void DeleteFeaPart(const std::string &geom_id, int fea_struct_ind, const std::string &part_id)
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
[in]part_idstring FEA Part ID

◆ DeleteFeaStruct()

void vsp::DeleteFeaStruct ( const std::string & geom_id,
int fea_struct_ind )
extern

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 );
void DeleteFeaStruct(const std::string &geom_id, int fea_struct_ind)
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index

◆ DeleteFeaSubSurf()

void vsp::DeleteFeaSubSurf ( const std::string & geom_id,
int fea_struct_ind,
const std::string & ss_id )
extern

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 );
@ SS_RECTANGLE
void DeleteFeaSubSurf(const std::string &geom_id, int fea_struct_ind, const std::string &ss_id)
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
[in]ss_idstring FEA SubSurface ID

◆ DelFeaBC()

void vsp::DelFeaBC ( const string & fea_struct_id,
const std::string & bc_id )
extern

Delete an FEA BC from a 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 BC ====//
string bc_id = AddFeaBC( struct_id, FEA_BC_STRUCTURE );
DelFeaBC( struct_id, bc_id );
void DelFeaBC(const string &fea_struct_id, const std::string &bc_id)
See also
FEA_BC_TYPE
Parameters
[in]fea_struct_idstring FEA Structure ID
[in]bc_idint FEA BC ID

◆ DelFeaPolySparPt()

void vsp::DelFeaPolySparPt ( const string & pspar_id,
int index )
extern

Delete the point at the given index from an FEA Poly Spar.

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
AddFeaPolySparPt( pspar_id );
AddFeaPolySparPt( pspar_id );
// Delete the point at index 1 (leaving 3 points)
DelFeaPolySparPt( pspar_id, 2 );
if ( GetFeaPolySparNumPt( pspar_id ) != 3 )
{
Print( "Error: DelFeaPolySparPt" );
}
void DelFeaPolySparPt(const string &pspar_id, int index)
See also
DelAllFeaPolySparPt, AddFeaPolySparPt, GetFeaPolySparNumPt
Parameters
[in]pspar_idstring FEA Poly Spar part ID
[in]indexint Index of the point to delete

◆ GetAllFeaPolySparPtIDVec()

vector< string > vsp::GetAllFeaPolySparPtIDVec ( const string & pspar_id)
extern

Get a vector of IDs for all points in an FEA Poly Spar. Each ID is a ParmContainer ID that can be used with FindParm to access the point's parameters such as Eta, U01, U0N, and XoC.

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
AddFeaPolySparPt( pspar_id );
array < string > pt_ids = GetAllFeaPolySparPtIDVec( pspar_id );
if ( pt_ids.size() != 3 )
{
Print( "Error: GetAllFeaPolySparPtIDVec" );
}
// Set each point's spanwise eta location
SetParmVal( FindParm( pt_ids[0], "Eta", "FeaPolySparPoint" ), 0.1 );
SetParmVal( FindParm( pt_ids[1], "Eta", "FeaPolySparPoint" ), 0.5 );
SetParmVal( FindParm( pt_ids[2], "Eta", "FeaPolySparPoint" ), 0.9 );
vector< string > GetAllFeaPolySparPtIDVec(const string &pspar_id)
See also
GetFeaPolySparPtID, FindParm, SetParmVal
Parameters
[in]pspar_idstring FEA Poly Spar part ID
Returns
vector <string> Vector of Poly Spar point ParmContainer IDs

◆ GetFeaBCIDVec()

std::vector< std::string > vsp::GetFeaBCIDVec ( const string & fea_struct_id)
extern

Return a vector of FEA BC ID's for a 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 BC ====//
string bc_id = AddFeaBC( struct_id, FEA_BC_STRUCTURE );
array < string > bc_id_vec = GetFeaBCIDVec( struct_id );
std::vector< std::string > GetFeaBCIDVec(const string &fea_struct_id)
Parameters
[in]fea_struct_idstring FEA Structure ID
Returns
vector<string> Array of FEA BC IDs

◆ GetFeaPartID()

std::string vsp::GetFeaPartID ( const std::string & fea_struct_id,
int fea_part_index )
extern

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, 1 ) ) // These should be equivalent (index 0 is skin)
{
Print( "Error: GetFeaPartID" );
}
std::string GetFeaPartID(const std::string &fea_struct_id, int fea_part_index)
void Update(bool update_managers=true)
Parameters
[in]fea_struct_idstring FEA Structure ID
[in]fea_part_indexint FEA Part index
Returns
string FEA Part ID

◆ GetFeaPartIDVec()

std::vector< std::string > vsp::GetFeaPartIDVec ( const std::string & fea_struct_id)
extern

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

//==== Add Geometries ====//
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 );
array < string > part_id_vec = GetFeaPartIDVec( struct_id ); // Should include slice_id & dome_id
@ FEA_DOME
Definition APIDefines.h:702
std::vector< std::string > GetFeaPartIDVec(const std::string &fea_struct_id)
See also
NumFeaParts
Parameters
[in]fea_struct_idstring FEA Structure ID
Returns
vector<string> Array of FEA Part IDs

◆ GetFeaPartName()

std::string vsp::GetFeaPartName ( const std::string & part_id)
extern

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" );
}
void SetFeaPartName(const std::string &part_id, const std::string &name)
std::string GetFeaPartName(const std::string &part_id)
See also
SetFeaPartName
Parameters
[in]part_idstring FEA Part ID
Returns
string FEA Part name

◆ GetFeaPartPerpendicularSparID()

std::string vsp::GetFeaPartPerpendicularSparID ( const std::string & part_id)
extern

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" );
}
@ SPAR_NORMAL
Definition APIDefines.h:718
@ FEA_RIB
Definition APIDefines.h:699
@ FEA_SPAR
Definition APIDefines.h:700
std::string GetFeaPartPerpendicularSparID(const std::string &part_id)
void SetFeaPartPerpendicularSparID(const std::string &part_id, const std::string &perpendicular_spar_id)
See also
FEA_RIB_NORMAL, SetFeaPartPerpendicularSparID
Parameters
[in]part_idstring FEA Part ID (Rib or Rib Array Type)
Returns
string Perpendicular FEA Spar ID

◆ GetFeaPartType()

int vsp::GetFeaPartType ( const std::string & part_id)
extern

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" );
}
int GetFeaPartType(const std::string &part_id)
See also
FEA_PART_TYPE
Parameters
[in]part_idstring FEA Part ID
Returns
int FEA Part type enum

◆ GetFeaPolySparNumPt()

int vsp::GetFeaPolySparNumPt ( const string & pspar_id)
extern

Get the number of points in an FEA Poly Spar. A newly created Poly Spar contains two points (the inboard and outboard endpoints).

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
// A new Poly Spar starts with 2 points
if ( GetFeaPolySparNumPt( pspar_id ) != 2 )
{
Print( "Error: GetFeaPolySparNumPt" );
}
See also
AddFeaPolySparPt, InsertFeaPolySparPt, DelFeaPolySparPt, DelAllFeaPolySparPt
Parameters
[in]pspar_idstring FEA Poly Spar part ID
Returns
int Number of points in the Poly Spar

◆ GetFeaPolySparPtID()

string vsp::GetFeaPolySparPtID ( const string & pspar_id,
int index )
extern

Get the ID of a point in an FEA Poly Spar. The returned ID is a ParmContainer ID that can be used with FindParm to access the point's parameters such as Eta, U01, U0N, and XoC.

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
string pt_id = GetFeaPolySparPtID( pspar_id, 0 );
// Set the spanwise location of the inboard point to eta = 0.1
SetParmVal( FindParm( pt_id, "Eta", "FeaPolySparPoint" ), 0.1 );
string pt_id_1 = GetFeaPolySparPtID( pspar_id, 1 );
// Set the spanwise location of the outboard point to eta = 0.9
SetParmVal( FindParm( pt_id_1, "Eta", "FeaPolySparPoint" ), 0.9 );
string GetFeaPolySparPtID(const string &pspar_id, int index)
See also
GetAllFeaPolySparPtIDVec, FindParm, SetParmVal
Parameters
[in]pspar_idstring FEA Poly Spar part ID
[in]indexint Index of the point
Returns
string ID of the Poly Spar point ParmContainer

◆ GetFeaPolySparPtName()

string vsp::GetFeaPolySparPtName ( const string & pspar_id,
int index )
extern

Get the name of a point in an FEA Poly Spar.

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
SetFeaPolySparPtName( pspar_id, 0, "InboardPt" );
string name = GetFeaPolySparPtName( pspar_id, 0 );
Print( "Point 0 name: " + name );
void SetFeaPolySparPtName(const string &pspar_id, int index, const string &name)
string GetFeaPolySparPtName(const string &pspar_id, int index)
See also
SetFeaPolySparPtName
Parameters
[in]pspar_idstring FEA Poly Spar part ID
[in]indexint Index of the point
Returns
string Name of the point

◆ GetFeaStructID()

std::string vsp::GetFeaStructID ( const std::string & geom_id,
int fea_struct_ind )
extern

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_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
Returns
string FEA Structure ID

◆ GetFeaStructIDVec()

std::vector< std::string > vsp::GetFeaStructIDVec ( )
extern

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 );
array < string > struct_id_vec = GetFeaStructIDVec();
std::vector< std::string > GetFeaStructIDVec()
See also
NumFeaStructures
Returns
vector<string> Array of FEA Structure IDs

◆ GetFeaStructIndex()

int vsp::GetFeaStructIndex ( const std::string & struct_id)
extern

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 );
int GetFeaStructIndex(const std::string &struct_id)
Parameters
[in]struct_idstring FEA Structure ID
Returns
int FEA Structure index

◆ GetFeaStructName()

std::string vsp::GetFeaStructName ( const std::string & geom_id,
int fea_struct_ind )
extern

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 );
std::string GetFeaStructName(const std::string &geom_id, int fea_struct_ind)
See also
FindContainer, SetFeaStructName
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
Returns
string Name for the FEA Structure

◆ GetFeaStructParentGeomID()

std::string vsp::GetFeaStructParentGeomID ( const std::string & struct_id)
extern

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_idstring FEA Structure ID
Returns
string Parent Geom ID

◆ GetFeaSubSurfIDVec()

std::vector< std::string > vsp::GetFeaSubSurfIDVec ( const std::string & fea_struct_id)
extern

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

//==== Add Geometries ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
string struct_id = GetFeaStructID( pod_id, struct_ind );
//==== Add SubSurfaces ====//
string line_array_id = AddFeaSubSurf( pod_id, struct_ind, SS_LINE_ARRAY );
string rectangle_id = AddFeaSubSurf( pod_id, struct_ind, SS_RECTANGLE );
array < string > part_id_vec = GetFeaSubSurfIDVec( struct_id ); // Should include line_array_id & rectangle_id
std::vector< std::string > GetFeaSubSurfIDVec(const std::string &fea_struct_id)
See also
NumFeaSubSurfs
Parameters
[in]fea_struct_idstring FEA Structure ID
Returns
vector<string> Array of FEA Part IDs

◆ GetFeaSubSurfIndex()

int vsp::GetFeaSubSurfIndex ( const string & ss_id)
extern

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 Slice ====//
string slice_id = AddFeaPart( pod_id, struct_ind, FEA_SLICE );
//==== 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 );
if ( 1 != GetFeaSubSurfIndex( rect_id ) ) // These should be equivalent
{
Print( "Error: GetFeaSubSurfIndex" );
}
int GetFeaSubSurfIndex(const string &ss_id)
Parameters
[in]ss_idstring FEA SubSurface ID
Returns
int FEA SubSurface Index

◆ GetFeaSubSurfName()

std::string vsp::GetFeaSubSurfName ( const std::string & subsurf_id)
extern

Set the name of an FEA SubSurface

//==== 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 );
string name = "example_name";
SetFeaSubSurfName( line_array_id, name );
if ( name != GetFeaSubSurfName( line_array_id ) ) // These should be equivalent
{
Print( "Error: GetFeaSubSurfName" );
}
void SetFeaSubSurfName(const std::string &subsurf_id, const std::string &name)
std::string GetFeaSubSurfName(const std::string &subsurf_id)
Parameters
[in]subsurf_idstring FEA SubSurface ID
Returns
string FEA SubSurf name

◆ InsertFeaPolySparPt()

string vsp::InsertFeaPolySparPt ( const string & pspar_id,
int index )
extern

Insert a point into an FEA Poly Spar before the given index and return its ID.

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
// Insert a new intermediate point between the two default endpoints
string pt_id = InsertFeaPolySparPt( pspar_id, 1 );
if ( GetFeaPolySparNumPt( pspar_id ) != 3 )
{
Print( "Error: InsertFeaPolySparPt" );
}
string InsertFeaPolySparPt(const string &pspar_id, int index)
See also
AddFeaPolySparPt, DelFeaPolySparPt, GetFeaPolySparNumPt
Parameters
[in]pspar_idstring FEA Poly Spar part ID
[in]indexint Index before which the new point is inserted
Returns
string ID of the newly inserted Poly Spar point

◆ MoveFeaPolySparPt()

int vsp::MoveFeaPolySparPt ( const string & pspar_id,
int index,
int reorder_type )
extern

Move a point within an FEA Poly Spar using a reorder type and return the new index of the moved point.

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
AddFeaPolySparPt( pspar_id );
// Move point at index 2 up one position
int new_index = MoveFeaPolySparPt( pspar_id, 2, REORDER_MOVE_UP );
if ( new_index != 1 )
{
Print( "Error: MoveFeaPolySparPt" );
}
@ REORDER_MOVE_UP
int MoveFeaPolySparPt(const string &pspar_id, int index, int reorder_type)
See also
REORDER_TYPE, AddFeaPolySparPt, GetFeaPolySparNumPt
Parameters
[in]pspar_idstring FEA Poly Spar part ID
[in]indexint Index of the point to move
[in]reorder_typeint Reorder type enum (i.e. REORDER_MOVE_UP, REORDER_MOVE_DOWN, REORDER_MOVE_TOP, REORDER_MOVE_BOTTOM)
Returns
int New index of the moved point

◆ NumFeaBCs()

int vsp::NumFeaBCs ( const string & fea_struct_id)
extern

Return number of FEA BC's in a 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 BC ====//
string bc_id = AddFeaBC( struct_id, FEA_BC_STRUCTURE );
int nbc = NumFeaBCs( struct_id );
int NumFeaBCs(const string &fea_struct_id)
Parameters
[in]fea_struct_idstring FEA Structure ID
Returns
int Number of FEA BCs

◆ NumFeaParts()

int vsp::NumFeaParts ( const std::string & fea_struct_id)
extern

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 ) != 3 ) // Includes FeaSkin
{
Print( "Error: NumFeaParts" );
}
int NumFeaParts(const std::string &fea_struct_id)
See also
GetFeaPartIDVec
Parameters
[in]fea_struct_idstring FEA Structure ID
Returns
int Number of FEA Parts

◆ NumFeaStructures()

int vsp::NumFeaStructures ( )
extern

Get the total number of FEA Structures 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" );
}
int NumFeaStructures()
See also
GetFeaStructIDVec
Returns
int Total Number of FEA Structures

◆ NumFeaSubSurfs()

int vsp::NumFeaSubSurfs ( const std::string & fea_struct_id)
extern

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" );
}
int NumFeaSubSurfs(const std::string &fea_struct_id)
See also
GetFeaSubSurfIDVec
Parameters
[in]fea_struct_idstring FEA Structure ID
Returns
int Number of FEA SubSurfaces

◆ SetFeaMeshFileName()

void vsp::SetFeaMeshFileName ( const std::string & geom_id,
int fea_struct_ind,
int file_type,
const string & file_name )
extern

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 );
string struct_id = GetFeaStructID( pod_id, struct_ind );
//=== Set Export File Name ===//
string export_name = "FEAMeshTest_calculix.dat";
//==== Get Parent Geom ID and Index ====//
string parent_id = GetFeaStructParentGeomID( struct_id ); // same as pod_id
SetFeaMeshFileName( parent_id, struct_ind, FEA_CALCULIX_FILE_NAME, export_name );
void SetFeaMeshFileName(const std::string &geom_id, int fea_struct_ind, int file_type, const string &file_name)
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
[in]file_typeint FEA output file type enum (i.e. FEA_EXPORT_TYPE)
[in]file_namestring Name for the output file

◆ SetFeaMeshStructIndex()

void vsp::SetFeaMeshStructIndex ( int struct_index)
extern

Sets FeaMeshMgr m_FeaMeshStructIndex member using passed in index of a FeaStructure

//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
//==== Add FeaStructure to Pod ====//
int struct_ind = AddFeaStruct( pod_id );
SetFeaMeshStructIndex( struct_ind );
if ( FindGeoms().size() != 0 ) { Print( "ERROR: VSPRenew" ); }
void SetFeaMeshStructIndex(int struct_index)
std::vector< std::string > FindGeoms()

◆ SetFeaMeshVal()

void vsp::SetFeaMeshVal ( const std::string & geom_id,
int fea_struct_ind,
int type,
double val )
extern

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 );
@ CFD_MIN_EDGE_LEN
Definition APIDefines.h:219
@ CFD_MAX_EDGE_LEN
Definition APIDefines.h:220
void SetFeaMeshVal(const std::string &geom_id, int fea_struct_ind, int type, double val)
See also
CFD_CONTROL_TYPE
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
[in]typeint FEA Mesh option type enum (i.e. CFD_MAX_EDGE_LEN)
[in]valdouble Value the option is set to

◆ SetFeaPartName()

void vsp::SetFeaPartName ( const std::string & part_id,
const std::string & name )
extern

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_idstring FEA Part ID
[in]namestring New name for the FEA Part

◆ SetFeaPartPerpendicularSparID()

void vsp::SetFeaPartPerpendicularSparID ( const std::string & part_id,
const std::string & perpendicular_spar_id )
extern

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_idstring FEA Part ID (Rib or Rib Array Type)
[in]perpendicular_spar_idstring FEA Spar ID

◆ SetFeaPolySparPtName()

void vsp::SetFeaPolySparPtName ( const string & pspar_id,
int index,
const string & name )
extern

Set the name of a point in an FEA Poly Spar.

string wing_id = AddGeom( "WING" );
int struct_ind = AddFeaStruct( wing_id );
string pspar_id = AddFeaPart( wing_id, struct_ind, FEA_POLY_SPAR );
SetFeaPolySparPtName( pspar_id, 0, "InboardPt" );
SetFeaPolySparPtName( pspar_id, 1, "OutboardPt" );
if ( GetFeaPolySparPtName( pspar_id, 0 ) != "InboardPt" )
{
Print( "Error: SetFeaPolySparPtName" );
}
See also
GetFeaPolySparPtName
Parameters
[in]pspar_idstring FEA Poly Spar part ID
[in]indexint Index of the point
[in]namestring New name for the point

◆ SetFeaStructName()

void vsp::SetFeaStructName ( const std::string & geom_id,
int fea_struct_ind,
const std::string & name )
extern

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" );
string parm_container_id = FindContainer( "Example_Struct", struct_ind );
string display_id = string("New Structure Parm Container ID: ") + parm_container_id + string("\n");
Print( display_id );
void SetFeaStructName(const std::string &geom_id, int fea_struct_ind, const std::string &name)
std::string FindContainer(const std::string &name, int index)
See also
GetFeaStructName
Parameters
[in]geom_idstring Parent Geom ID
[in]fea_struct_indint FEA Structure index
[in]namestring New name for the FEA Structure

◆ SetFeaSubSurfName()

void vsp::SetFeaSubSurfName ( const std::string & subsurf_id,
const std::string & name )
extern

Set the name of an FEA SubSurface

//==== 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 );
SetFeaSubSurfName( line_array_id, "Stiffener_array" );
Parameters
[in]subsurf_idstring FEA SubSurface ID
[in]namestring New name for the FEA SubSurface