OpenVSP API Documentation 3.51.3
Loading...
Searching...
No Matches
StackGeom Functions

This group of functions is available for interacting with a StackGeom through the API. Click here to return to the main page. More...

Functions

void vsp::InitStackPreset (const std::string &geom_id, int preset)

Detailed Description

Function Documentation

◆ InitStackPreset()

void vsp::InitStackPreset ( const std::string & geom_id,
int preset )
extern

Replace every XSec of a StackGeom with a preset starting point. Most of the presets lay out a nacelle; which one you want depends on whether the model needs the inlet, the outlet, the external surface, the internal flowpath, or some combination. This discards the existing cross sections, so it belongs right after the StackGeom is created.

string stack_id = AddGeom( "STACK", "" );
// Each preset lays down its own set of XSecs, replacing the default five.
string xsec_surf = GetXSecSurf( stack_id, 0 );
if ( GetNumXSec( xsec_surf ) != 7 )
{
Print( "ERROR: InitStackPreset did not rebuild the XSecs" );
__failure++;
}
@ STACK_PRESET_FLOWTHRU_MID_ORIG
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
void InitStackPreset(const std::string &geom_id, int preset)
void Update(bool update_managers=true)
std::string GetXSecSurf(const std::string &geom_id, int index)
int GetNumXSec(const std::string &xsec_surf_id)
Parameters
[in]geom_idstring StackGeom Geom ID
[in]presetint Preset enum (see STACK_PRESETS)