Apame C++ API 0.0.20261017
Aerodynamic panel method solver
Loading...
Searching...
No Matches
APAME::IApame Class Referenceabstract

#include <apame.h>

Public Member Functions

virtual void setCallback (IApameCallback *callback, bool printProgressBar=true)=0
virtual const char * getApameErrorDescription (APAME_ERROR code)=0
 Returns Apame error description.
virtual APAME_ERROR allocateNodes (int numNodes)=0
virtual void addNode (float *coordinates)=0
virtual APAME_ERROR storeNodes (int numNodes, float *coordinates)=0
virtual APAME_ERROR allocatePanels (int numPanels)=0
virtual APAME_ERROR addBodyPanel (const PANEL_TYPE type, const int *nodes, int component)=0
virtual int getNumComponents ()=0
virtual int getNumWakeNodes ()=0
virtual float * getWakeNodes ()=0
virtual int getNumWakePanels ()=0
virtual APAME_ERROR getWakePanelInfo (int panelIndex, int &numNodes, int *nodes, int *trailingPanels)=0
virtual APAME_ERROR setFarField (float farField)=0
virtual float getFarField ()=0
virtual APAME_ERROR setCollDepth (float collDepth)=0
virtual float getCollDepth ()=0
virtual APAME_ERROR setNeighboringAngle (float angle)=0
virtual float getNeighboringAngle ()=0
virtual APAME_ERROR setTimeStep (float timeStep)=0
virtual float getTimeStep ()=0
virtual void setWakeRequest (bool wakeRequest)=0
virtual bool getWakeRequest ()=0
virtual APAME_ERROR setWakeAngle (float angle)=0
virtual float getWakeAngle ()=0
virtual APAME_ERROR setWakeLength (float length)=0
virtual float getWakeLength ()=0
virtual APAME_ERROR setNumWakeRows (int numWakeRows)=0
virtual int getNumWakeRowsSteady ()=0
virtual int getNumWakeRowsTrans ()=0
virtual APAME_ERROR setWakePropagation (int propType)=0
virtual int getWakePropagation ()=0
virtual APAME_ERROR setWakePropAngle (float angle)=0
virtual float getWakePropAngle ()=0
virtual APAME_ERROR setWakePropMinScaling (float minScaling)=0
virtual float getWakePropMinScaling ()=0
virtual APAME_ERROR setSingularity (int singularityType)=0
virtual int getSingularity ()=0
virtual void addCaseInBodyCs (float x, float y, float z)=0
virtual void addCaseInAeroCs (float airspeed, float alfa, float beta)=0
virtual int getNumberOfCases ()=0
virtual float * getCases ()=0
virtual APAME_ERROR setCurvature (int curvatureType)=0
virtual int getCurvature ()=0
virtual APAME_ERROR setDensity (float density)=0
virtual float getDensity ()=0
virtual APAME_ERROR setMach (float mach)=0
virtual float getMach ()=0
virtual APAME_ERROR setRefPressure (float pressure)=0
virtual float getRefPressure ()=0
virtual void setOrigin (float x, float y, float z)=0
virtual float * getOrigin ()=0
virtual APAME_ERROR setArea (float area)=0
virtual float getArea ()=0
virtual APAME_ERROR setSpan (float span)=0
virtual float getSpan ()=0
virtual APAME_ERROR setMac (float mac)=0
virtual float getMac ()=0
virtual void setCalculationRequests (int calculationRequests)=0
virtual int getCalculationRequests ()=0
virtual APAME_ERROR runSteadyStateAnalysis ()=0
virtual APAME_ERROR initializeTransientAnalysis ()=0
virtual APAME_ERROR runTransientAnalysisStep ()=0
virtual void addPanelVelocities (const float *velocities)=0
virtual float getProgress ()=0
virtual void requestStop ()=0
 Requests termination of supported tasks.
virtual void requestPause ()=0
 Requests pause of supported tasks.
virtual void requestResume ()=0
 Requests resume of supported tasks.
virtual APAME_ERROR getWakePanelScaling (int panelIndex, float &wakeScaling)=0
virtual APAME_ERROR getWakePanelStrength (int panelIndex, int caseIndex, float &wakeStrength)=0
virtual float getAeroForce (int caseIndex, int dir, int component=-1)=0
virtual float getBodyForce (int caseIndex, int dir, int component=-1)=0
virtual float getMoment (int caseIndex, int dir, int component=-1)=0
virtual float getAeroForceCoef (int caseIndex, int dir, int component=-1)=0
virtual float getBodyForceCoef (int caseIndex, int dir, int component=-1)=0
virtual float getMomentCoef (int caseIndex, int dir, int component=-1)=0
virtual float * getFieldResult (int field)=0
virtual int getPlaneCut (const float origin[3], const float dirH[3], const float dirV[3], const int field, float **outPoints, float **outValues, int **outCurveStart, int **outCurveClosed, int *outTotalPoints, const int numComponents=0, const int *components=nullptr)=0
virtual void getForceDistributionCurve (const float dirU[3], const float dirV[3], const int numPoints, float *pointCoords, float *forces, const int caseIndex=0, const int numComponents=0, const int *components=nullptr)=0
virtual void getLiftDistributionCurve (const float dirU[3], const int numPoints, float *pointCoords, float *forces, const int caseIndex=0, const int numComponents=0, const int *components=nullptr)=0
virtual void clearCalculationRequests ()=0
 Clears calculation requests.
virtual void clearCases ()=0
 Clears cases.
virtual void clearPanels ()=0
 Clears panels.
virtual void clearNodes ()=0
 Clears nodes.
virtual void clearPlaneCuts ()=0
 Clears plane cuts.
virtual void clear ()=0
 Clears everything.
virtual void releaseLicense ()=0
virtual const char * getLicenseStamp ()=0

Member Function Documentation

◆ setCallback()

virtual void APAME::IApame::setCallback ( IApameCallback * callback,
bool printProgressBar = true )
pure virtual

Sets Apame callback interface

Parameters
callback- Pointer to callback interface
printProgressBar- Print progress bar

◆ getApameErrorDescription()

virtual const char * APAME::IApame::getApameErrorDescription ( APAME_ERROR code)
pure virtual

Returns Apame error description.

◆ allocateNodes()

virtual APAME_ERROR APAME::IApame::allocateNodes ( int numNodes)
pure virtual

Allocates nodes in order to speed up the node addition process

Parameters
numNodes- Number of nodes to allocate
Returns
Error code

◆ addNode()

virtual void APAME::IApame::addNode ( float * coordinates)
pure virtual

Adds node with given coordinates

Parameters
coordinates- Array of node coordinates (x,y,z)

◆ storeNodes()

virtual APAME_ERROR APAME::IApame::storeNodes ( int numNodes,
float * coordinates )
pure virtual

Store full node array

Parameters
numNodes- Number of nodes
coordinates- Array of node coordinates (x,y,z)
Returns
Error code

◆ allocatePanels()

virtual APAME_ERROR APAME::IApame::allocatePanels ( int numPanels)
pure virtual

Allocates panels in order to speed up the panel addition process

Parameters
numPanels- Number of panels to allocate
Returns
Error code

◆ addBodyPanel()

virtual APAME_ERROR APAME::IApame::addBodyPanel ( const PANEL_TYPE type,
const int * nodes,
int component )
pure virtual

Adds body panel to Apame object

Parameters
type- Panel type
nodes- Node indexes of panel
component- Component ID
Returns
Error code

◆ getNumComponents()

virtual int APAME::IApame::getNumComponents ( )
pure virtual

Gets number of components

Returns
Number of components

◆ getNumWakeNodes()

virtual int APAME::IApame::getNumWakeNodes ( )
pure virtual

Gets number of wake nodes

Returns
Number of wake nodes

◆ getWakeNodes()

virtual float * APAME::IApame::getWakeNodes ( )
pure virtual

Gets wake nodes

Returns
Array of wake nodes

◆ getNumWakePanels()

virtual int APAME::IApame::getNumWakePanels ( )
pure virtual

Gets number of wake panels

Returns
Number of wake panels

◆ getWakePanelInfo()

virtual APAME_ERROR APAME::IApame::getWakePanelInfo ( int panelIndex,
int & numNodes,
int * nodes,
int * trailingPanels )
pure virtual

Gets wake panel information

Parameters
panelIndex- Wake panel index
numNodes- Number of nodes
nodes- Array of node indices
trailingPanels- Array of trailing panel indices
Returns
Error code

◆ setFarField()

virtual APAME_ERROR APAME::IApame::setFarField ( float farField)
pure virtual

Sets far-field coefficient

Parameters
farField- Far-field coefficient
Returns
Error code

◆ getFarField()

virtual float APAME::IApame::getFarField ( )
pure virtual

◆ setCollDepth()

virtual APAME_ERROR APAME::IApame::setCollDepth ( float collDepth)
pure virtual

Sets collocation depth

Parameters
collDepth- Collocation depth
Returns
Error code

◆ getCollDepth()

virtual float APAME::IApame::getCollDepth ( )
pure virtual

◆ setNeighboringAngle()

virtual APAME_ERROR APAME::IApame::setNeighboringAngle ( float angle)
pure virtual

Sets neighboring angle threshold

Parameters
angle- Neighboring angle threshold
Returns
Error code

◆ getNeighboringAngle()

virtual float APAME::IApame::getNeighboringAngle ( )
pure virtual

◆ setTimeStep()

virtual APAME_ERROR APAME::IApame::setTimeStep ( float timeStep)
pure virtual

Sets time step size (for transient analysis)

Parameters
timeStep- Time step size
Returns
Error code

◆ getTimeStep()

virtual float APAME::IApame::getTimeStep ( )
pure virtual

◆ setWakeRequest()

virtual void APAME::IApame::setWakeRequest ( bool wakeRequest)
pure virtual

Sets wake request

Parameters
wakeRequest- Wake request flag

◆ getWakeRequest()

virtual bool APAME::IApame::getWakeRequest ( )
pure virtual

◆ setWakeAngle()

virtual APAME_ERROR APAME::IApame::setWakeAngle ( float angle)
pure virtual

Sets wake angle threshold

Parameters
angle- Wake angle threshold
Returns
Error code

◆ getWakeAngle()

virtual float APAME::IApame::getWakeAngle ( )
pure virtual

◆ setWakeLength()

virtual APAME_ERROR APAME::IApame::setWakeLength ( float length)
pure virtual

Sets wake length

Parameters
length- Wake length
Returns
Error code

◆ getWakeLength()

virtual float APAME::IApame::getWakeLength ( )
pure virtual

◆ setNumWakeRows()

virtual APAME_ERROR APAME::IApame::setNumWakeRows ( int numWakeRows)
pure virtual

Sets number of wake rows (steady state analysis only)

Parameters
numWakeRows- Number of wake rows
Returns
Error code

◆ getNumWakeRowsSteady()

virtual int APAME::IApame::getNumWakeRowsSteady ( )
pure virtual

◆ getNumWakeRowsTrans()

virtual int APAME::IApame::getNumWakeRowsTrans ( )
pure virtual

◆ setWakePropagation()

virtual APAME_ERROR APAME::IApame::setWakePropagation ( int propType)
pure virtual

Sets wake propagation request

Parameters
propType- Wake propagation request type
Returns
Error code

◆ getWakePropagation()

virtual int APAME::IApame::getWakePropagation ( )
pure virtual

◆ setWakePropAngle()

virtual APAME_ERROR APAME::IApame::setWakePropAngle ( float angle)
pure virtual

Sets wake propagation angle

Parameters
angle- Wake propagation angle
Returns
Error code

◆ getWakePropAngle()

virtual float APAME::IApame::getWakePropAngle ( )
pure virtual

◆ setWakePropMinScaling()

virtual APAME_ERROR APAME::IApame::setWakePropMinScaling ( float minScaling)
pure virtual

Sets wake propagation minimum scaling (end wake strength scaling)

Parameters
minScaling- Minimum scaling in ratio
Returns
Error code

◆ getWakePropMinScaling()

virtual float APAME::IApame::getWakePropMinScaling ( )
pure virtual

◆ setSingularity()

virtual APAME_ERROR APAME::IApame::setSingularity ( int singularityType)
pure virtual

Sets singularity type

Parameters
singularityType- Singularity type
Returns
Error code

◆ getSingularity()

virtual int APAME::IApame::getSingularity ( )
pure virtual

◆ addCaseInBodyCs()

virtual void APAME::IApame::addCaseInBodyCs ( float x,
float y,
float z )
pure virtual

Adds case in body coordinate system

Parameters
x- X coordinate
y- Y coordinate
z- Z coordinate

◆ addCaseInAeroCs()

virtual void APAME::IApame::addCaseInAeroCs ( float airspeed,
float alfa,
float beta )
pure virtual

Adds case in aerodynamic coordinate system

Parameters
airspeed- Airspeed
alfa- Angle of attack (in radians)
beta- Sideslip angle (in radians)

◆ getNumberOfCases()

virtual int APAME::IApame::getNumberOfCases ( )
pure virtual

Gets number of cases

Returns
Number of cases

◆ getCases()

virtual float * APAME::IApame::getCases ( )
pure virtual

Gets cases

Returns
Array of cases (flow components)

◆ setCurvature()

virtual APAME_ERROR APAME::IApame::setCurvature ( int curvatureType)
pure virtual

Sets curvature correction

Parameters
curvatureType- Curvature correction type
Returns
Error code

◆ getCurvature()

virtual int APAME::IApame::getCurvature ( )
pure virtual

◆ setDensity()

virtual APAME_ERROR APAME::IApame::setDensity ( float density)
pure virtual

Sets air density

Parameters
density- Air density
Returns
Error code

◆ getDensity()

virtual float APAME::IApame::getDensity ( )
pure virtual

◆ setMach()

virtual APAME_ERROR APAME::IApame::setMach ( float mach)
pure virtual

Sets Mach number for compressibility correction

Parameters
mach- Mach number
Returns
Error code

◆ getMach()

virtual float APAME::IApame::getMach ( )
pure virtual

◆ setRefPressure()

virtual APAME_ERROR APAME::IApame::setRefPressure ( float pressure)
pure virtual

Sets reference pressure

Parameters
pressure- Reference pressure
Returns
Error code

◆ getRefPressure()

virtual float APAME::IApame::getRefPressure ( )
pure virtual

◆ setOrigin()

virtual void APAME::IApame::setOrigin ( float x,
float y,
float z )
pure virtual

Sets origin coordinates

Parameters
x- Origin X coordinate
y- Origin Y coordinate
z- Origin Z coordinate

◆ getOrigin()

virtual float * APAME::IApame::getOrigin ( )
pure virtual

◆ setArea()

virtual APAME_ERROR APAME::IApame::setArea ( float area)
pure virtual

Sets wing surface area reference value

Parameters
area- Wing surface area
Returns
Error code

◆ getArea()

virtual float APAME::IApame::getArea ( )
pure virtual

◆ setSpan()

virtual APAME_ERROR APAME::IApame::setSpan ( float span)
pure virtual

Sets wing span (span) reference value

Parameters
span- Wing span
Returns
Error code

◆ getSpan()

virtual float APAME::IApame::getSpan ( )
pure virtual

◆ setMac()

virtual APAME_ERROR APAME::IApame::setMac ( float mac)
pure virtual

Sets mean aerodynamic chord (length) reference value

Parameters
mac- Mean aerodynamic chord (length)
Returns
Error code

◆ getMac()

virtual float APAME::IApame::getMac ( )
pure virtual

◆ setCalculationRequests()

virtual void APAME::IApame::setCalculationRequests ( int calculationRequests)
pure virtual

Sets calculation requests

Parameters
calculationRequests- Calculation requests

◆ getCalculationRequests()

virtual int APAME::IApame::getCalculationRequests ( )
pure virtual

◆ runSteadyStateAnalysis()

virtual APAME_ERROR APAME::IApame::runSteadyStateAnalysis ( )
pure virtual

Runs steady state analysis

Returns
Error code

◆ initializeTransientAnalysis()

virtual APAME_ERROR APAME::IApame::initializeTransientAnalysis ( )
pure virtual

Initializes transient analysis

Returns
Error code

◆ runTransientAnalysisStep()

virtual APAME_ERROR APAME::IApame::runTransientAnalysisStep ( )
pure virtual

Runs transient analysis step

Returns
Error code

◆ addPanelVelocities()

virtual void APAME::IApame::addPanelVelocities ( const float * velocities)
pure virtual

Adds velocities at collocation points due to structural motion (i.e. oscillations or rotation)

Parameters
velocities- Array of velocity components (vx,vy,vz) for each panel

◆ getProgress()

virtual float APAME::IApame::getProgress ( )
pure virtual

Returns progress of supported tasks

Returns
Progress value

◆ requestStop()

virtual void APAME::IApame::requestStop ( )
pure virtual

Requests termination of supported tasks.

◆ requestPause()

virtual void APAME::IApame::requestPause ( )
pure virtual

Requests pause of supported tasks.

◆ requestResume()

virtual void APAME::IApame::requestResume ( )
pure virtual

Requests resume of supported tasks.

◆ getWakePanelScaling()

virtual APAME_ERROR APAME::IApame::getWakePanelScaling ( int panelIndex,
float & wakeScaling )
pure virtual

Gets wake panel scaling coefficient field

Parameters
panelIndex- Wake panel index
wakeScaling- Wake panel scaling coefficient
Returns
Error code

◆ getWakePanelStrength()

virtual APAME_ERROR APAME::IApame::getWakePanelStrength ( int panelIndex,
int caseIndex,
float & wakeStrength )
pure virtual

Gets wake panel strength field

Parameters
panelIndex- Wake panel index
caseIndex- Case index
wakeStrength- Wake panel strength
Returns
Error code

◆ getAeroForce()

virtual float APAME::IApame::getAeroForce ( int caseIndex,
int dir,
int component = -1 )
pure virtual

Gets force in aerodynamic coordinate system

Parameters
caseIndex- Case index
dir- Direction (0=X, 1=Y, 2=Z)
component- Component index
Returns
Aerodynamic force

◆ getBodyForce()

virtual float APAME::IApame::getBodyForce ( int caseIndex,
int dir,
int component = -1 )
pure virtual

Gets force in body coordinate system

Parameters
caseIndex- Case index
dir- Direction (0=X, 1=Y, 2=Z)
component- Component index
Returns
Body force

◆ getMoment()

virtual float APAME::IApame::getMoment ( int caseIndex,
int dir,
int component = -1 )
pure virtual

Gets moment

Parameters
caseIndex- Case index
dir- Direction (0=X, 1=Y, 2=Z)
component- Component index
Returns
Moment

◆ getAeroForceCoef()

virtual float APAME::IApame::getAeroForceCoef ( int caseIndex,
int dir,
int component = -1 )
pure virtual

Gets force coefficient in aerodynamic coordinate system

Parameters
caseIndex- Case index
dir- Direction (0=X, 1=Y, 2=Z)
component- Component index
Returns
Aerodynamic force coefficient

◆ getBodyForceCoef()

virtual float APAME::IApame::getBodyForceCoef ( int caseIndex,
int dir,
int component = -1 )
pure virtual

Gets force coefficient in body coordinate system

Parameters
caseIndex- Case index
dir- Direction (0=X, 1=Y, 2=Z)
component- Component index
Returns
Body force coefficient

◆ getMomentCoef()

virtual float APAME::IApame::getMomentCoef ( int caseIndex,
int dir,
int component = -1 )
pure virtual

Gets moment coefficient

Parameters
caseIndex- Case index
dir- Direction (0=X, 1=Y, 2=Z)
component- Component index
Returns
Moment coefficient

◆ getFieldResult()

virtual float * APAME::IApame::getFieldResult ( int field)
pure virtual

Gets field result

Parameters
field- Field result component
Returns
Field result

◆ getPlaneCut()

virtual int APAME::IApame::getPlaneCut ( const float origin[3],
const float dirH[3],
const float dirV[3],
const int field,
float ** outPoints,
float ** outValues,
int ** outCurveStart,
int ** outCurveClosed,
int * outTotalPoints,
const int numComponents = 0,
const int * components = nullptr )
pure virtual

Performs a planar cut of the geometry and evaluates the selected field at cut points

Parameters
origin- Plane origin [x, y, z]
dirH- Horizontal direction vector (defines local U axis)
dirV- Vertical direction vector (defines local V axis)
field- Field to evaluate (velocity, pressure coefficient, etc.)
outPoints- Output array of 3D points (x1, y1, z1, x2, y2, z2, ...)
outValues- Output array of field values at each point
outCurveStart- Output array of curve start indices (for each curve)
outCurveClosed- Output array of flags (0=open, 1=closed) for each curve
outTotalPoints- Total number of points in all curves
numComponents- Number of components to evaluate (if 0, all components are evaluated)
components- Array of components to evaluate
Returns
Number of curves. If return == 0, no intersection found

◆ getForceDistributionCurve()

virtual void APAME::IApame::getForceDistributionCurve ( const float dirU[3],
const float dirV[3],
const int numPoints,
float * pointCoords,
float * forces,
const int caseIndex = 0,
const int numComponents = 0,
const int * components = nullptr )
pure virtual

Gets force distribution curve in specified plane

Parameters
dirU- Span direction vector
dirV- Force direction vector
numPoints- Number of output points in span direction
pointCoords- Output array of span coordinates
forces- Output array of forces per unit length
caseIndex- Case index (default 0 - first case)
numComponents- Number of components to evaluate (if 0, all components are evaluated)
components- Array of components to evaluate

◆ getLiftDistributionCurve()

virtual void APAME::IApame::getLiftDistributionCurve ( const float dirU[3],
const int numPoints,
float * pointCoords,
float * forces,
const int caseIndex = 0,
const int numComponents = 0,
const int * components = nullptr )
pure virtual

Gets lift distribution curve in specified direction

Parameters
dirU- Span direction vector
numPoints- Number of output points in span direction
pointCoords- Output array of span coordinates
forces- Output array of forces per unit length
caseIndex- Case index (default 0 - first case)
numComponents- Number of components to evaluate (if 0, all components are evaluated)
components- Array of components to evaluate

◆ clearCalculationRequests()

virtual void APAME::IApame::clearCalculationRequests ( )
pure virtual

Clears calculation requests.

◆ clearCases()

virtual void APAME::IApame::clearCases ( )
pure virtual

Clears cases.

◆ clearPanels()

virtual void APAME::IApame::clearPanels ( )
pure virtual

Clears panels.

◆ clearNodes()

virtual void APAME::IApame::clearNodes ( )
pure virtual

Clears nodes.

◆ clearPlaneCuts()

virtual void APAME::IApame::clearPlaneCuts ( )
pure virtual

Clears plane cuts.

◆ clear()

virtual void APAME::IApame::clear ( )
pure virtual

Clears everything.

◆ releaseLicense()

virtual void APAME::IApame::releaseLicense ( )
pure virtual

Gives the license of the active task back to the license server. The model and its results are kept; the next run takes the license again. To be called when the task this solver belongs to is closed, so that its license is free at once (deleting the solver does the same).

◆ getLicenseStamp()

virtual const char * APAME::IApame::getLicenseStamp ( )
pure virtual

Returns the line that identifies the registered user and the type of the license, as it is put on everything the software produces (asked from the license server).

Returns
Line such as "Made with Apame 1.0.20261011 - registered to John Doe, Example Ltd - Academic license"

The documentation for this class was generated from the following file:
  • apame.h