|
Afeme C++ API 0.0.20261017
Structural finite element solver
|
#include <afeme.h>
Public Member Functions | |
| virtual void | setCallback (IAfemeCallback *callback, bool printProgressBar=true)=0 |
| virtual const char * | getAfemeErrorDescription (AFEME_ERROR code)=0 |
| Returns Afeme error description. | |
| virtual AFEME_ERROR | addMaterial (float youngModulus, float poissonRatio, float density)=0 |
| virtual AFEME_ERROR | updateMaterial (int material, float youngModulus, float poissonRatio, float density)=0 |
| virtual AFEME_ERROR | addBeamProperty (int material, int numCoords, float *coords)=0 |
| virtual AFEME_ERROR | addShellProperty (int material, float thickness)=0 |
| virtual void | addSolidProperty (int material)=0 |
| virtual AFEME_ERROR | updateShellProperty (int property, int material, float thickness)=0 |
| virtual AFEME_ERROR | updateSolidProperty (int property, int material)=0 |
| virtual void | addPointMassProperty (float mass, float Ixx, float Iyy, float Izz, float Ixy=0.0f, float Ixz=0.0f, float Iyz=0.0f)=0 |
| virtual void | storeNodes (int numNodes, float *coordinates)=0 |
| virtual void | allocateNodes (int numNodes)=0 |
| virtual void | addNode (float *coordinates)=0 |
| virtual void | addBeamElement (int property, int *elementNodes, float *upVector)=0 |
| virtual void | addTriaElement (const int property, const int *elementNodes)=0 |
| virtual void | addQuadElement (const int property, const int *elementNodes)=0 |
| virtual void | addTetraElement (int property, int *elementNodes)=0 |
| virtual void | addHexaElement (int property, int *elementNodes)=0 |
| virtual void | addWedgeElement (int property, int *elementNodes)=0 |
| virtual void | addPointMassElement (int property, int node, const float *t=nullptr)=0 |
| virtual int | getNumDofs ()=0 |
| virtual AFEME_ERROR | addConstraint (int node, int dof)=0 |
| virtual AFEME_ERROR | addRigidMpc (int masterNode, const int *slaveNodes, int numSlaves, bool tieRotations=true)=0 |
| virtual AFEME_ERROR | addAverageMpc (int masterNode, const int *slaveNodes, int numSlaves, const double *weights=nullptr)=0 |
| virtual AFEME_ERROR | addForce (int nodeIndex, int nodalDofIndex, float value, int loadCaseIndex=0)=0 |
| virtual AFEME_ERROR | addPressure (int elemIndex, int faceIndex, float value, int loadCaseIndex=0)=0 |
| virtual int | getNumLoadCases ()=0 |
| virtual void | setStorageSystem (AFEME_STORAGE_SYSTEM storageType)=0 |
| virtual void | setPressureDistributionType (PRESSURE_DISTRIBUTION_TYPE distributionType)=0 |
| virtual void | setEigenvaluePerformanceMode (AFEME_EIGENVALUE_PERFORMANCE_MODE mode)=0 |
| virtual AFEME_ERROR | setNfaNumModes (int numModes)=0 |
| virtual int | getNfaNumModes ()=0 |
| virtual AFEME_ERROR | setNfaLowerFreq (double freqLower)=0 |
| virtual double | getNfaLowerFreq ()=0 |
| virtual AFEME_ERROR | setNfaUpperFreq (double freqUpper)=0 |
| virtual double | getNfaUpperFreq ()=0 |
| virtual AFEME_ERROR | setLbaNumModes (int numModes)=0 |
| virtual int | getLbaNumModes ()=0 |
| virtual void | setLbaLowerEigenvalue (double eigenvalueLower)=0 |
| virtual double | getLbaLowerEigenvalue ()=0 |
| virtual void | setLbaUpperEigenvalue (double eigenvalueUpper)=0 |
| virtual double | getLbaUpperEigenvalue ()=0 |
| virtual void | setLbaPressureLoadStiffness (bool include)=0 |
| virtual bool | getLbaPressureLoadStiffness ()=0 |
| virtual AFEME_ERROR | setStepSize (float stepSize)=0 |
| virtual float | getStepSize ()=0 |
| virtual AFEME_ERROR | setStructuralDampingCoefficient (float structuralDampingCoefficient)=0 |
| virtual float | getStructuralDampingCoefficient ()=0 |
| virtual AFEME_ERROR | setStructuralDampingConversionFrequency (float structuralDampingConversionFrequency)=0 |
| virtual float | getStructuralDampingConversionFrequency ()=0 |
| virtual AFEME_ERROR | runLinearStaticAnalysis ()=0 |
| virtual AFEME_ERROR | runNaturalFrequenciesAnalysis ()=0 |
| virtual AFEME_ERROR | runLinearBucklingAnalysis ()=0 |
| virtual AFEME_ERROR | initializeTransientResponseAnalysis ()=0 |
| virtual AFEME_ERROR | runTransientResponseAnalysisStep ()=0 |
| virtual float | getProgress ()=0 |
| Returns progress of supported tasks. | |
| 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 AFEME_ERROR | getDisplacementValue (const int nodeIndex, const int dofIndex, const int caseIndex, float &displacement, AFEME_ANALYSIS_TYPE analysisType=ANALYSIS_NONE)=0 |
| virtual AFEME_ERROR | getNumExtractedModes (int &numExtractedModes, AFEME_ANALYSIS_TYPE analysisType=ANALYSIS_NONE)=0 |
| virtual AFEME_ERROR | getEigenvalue (const int modeIndex, float &eigenvalue, AFEME_ANALYSIS_TYPE analysisType=ANALYSIS_NONE)=0 |
| virtual AFEME_ERROR | getEigenfrequency (const int modeIndex, float &eigenfrequency, AFEME_ANALYSIS_TYPE analysisType=ANALYSIS_NONE)=0 |
| virtual AFEME_ERROR | getEigenvectorValue (const int nodeIndex, const int dofIndex, const int modeIndex, float &eigenvector, AFEME_ANALYSIS_TYPE analysisType)=0 |
| virtual int | getNumSteps ()=0 |
| virtual AFEME_ERROR | getMaxElemVonMisesStressValue (const int elemIndex, const int caseIndex, float &stress, AFEME_ANALYSIS_TYPE analysisType)=0 |
| virtual void | clearMaterials ()=0 |
| Clears all materials' data. | |
| virtual void | clearProperties ()=0 |
| Clears all properties' data. | |
| virtual void | clearNodes ()=0 |
| Clears all nodes' data. | |
| virtual void | clearElements ()=0 |
| Clears all elements' data. | |
| virtual void | clearConstraints ()=0 |
| Clears all constraints. | |
| virtual void | clearMpcs ()=0 |
| Clears all multi point constraints. | |
| virtual void | clearLoad ()=0 |
| Clears all loads. | |
| virtual void | releaseLicense ()=0 |
| virtual const char * | getLicenseStamp ()=0 |
|
pure virtual |
Sets Afeme callback interface
| callback | - Pointer to callback interface |
| printProgressBar | - Print progress bar |
|
pure virtual |
Returns Afeme error description.
|
pure virtual |
Adds material
| youngModulus | - Young's modulus |
| poissonRatio | - Poisson's ratio |
| density | - Density |
|
pure virtual |
Updates material with new values
| material | - Material |
| youngModulus | - Young's modulus |
| poissonRatio | - Poisson's ratio |
| density | - Density |
|
pure virtual |
Adds beam property
| material | - Material index |
| numCoords | - Number of polyline coordinates |
| coords | - Array of polyline coordinates |
|
pure virtual |
Adds shell property
| material | - Material |
| thickness | - Shell thickness |
|
pure virtual |
Adds solid property
| material | - Material |
|
pure virtual |
Updates shell property with new material and thickness values
| property | - Property index |
| material | - Material index |
| thickness | - Shell thickness |
|
pure virtual |
Updates solid property with new material index
| property | - Property index |
| material | - Material index |
|
pure virtual |
Adds point mass property
| mass | - Mass |
| Ixx,Iyy,Izz,Ixy,Ixz,Iyz | - Inertia tensor at CoG in property local axes (products of inertia 0 if not given) |
|
pure virtual |
Stores given node coordinates array information
| numNodes | - Number of nodes |
| coordinates | - Array of node coordinates (x1,y1,z1,x2,y2,z2...) |
|
pure virtual |
Allocates requested number of nodes
| numNodes | - Number of nodes to allocate |
|
pure virtual |
Adds node with given coordinates
| coordinates | - Array of node coordinates (x,y,z) |
|
pure virtual |
Adds beam element
| property | - Index of element property |
| elementNodes | - Array of constituting node indexes |
| upVector | - Vector defining cross section vertical direction |
|
pure virtual |
Adds triangular element (triangle)
| property | - Index of element property |
| elementNodes | - Array of constituting node indexes |
|
pure virtual |
Adds quadrilateral element (quadrangle)
| property | - Index of element property |
| elementNodes | - Array of constituting node indexes |
|
pure virtual |
Adds tetrahedral element (tetrahedron)
| property | - Index of element property |
| elementNodes | - Array of constituting node indexes |
|
pure virtual |
Adds hexahedral element (hexahedron)
| property | - Index of element property |
| elementNodes | - Array of constituting node indexes |
|
pure virtual |
Adds triangular prism element (wedge)
| property | - Index of element property |
| elementNodes | - Array of constituting node indexes |
|
pure virtual |
Adds point mass element
| property | - Index of point mass property |
| node | - Single node index |
| t | - Optional 3x3 row-major rotation local->global |
|
pure virtual |
Returns number of DOFs in the system
|
pure virtual |
Adds constraint to nodal DOF
| node | - Index of node |
| dof | - Node degree of freedom (DOF) |
|
pure virtual |
Adds rigid multi point constraint: slave nodes follow master node as one rigid body. Master node keeps all six DOFs (it does not need to belong to any element) and can be loaded or constrained as any other node.
| masterNode | - Master node index |
| slaveNodes | - Array of slave node indices |
| numSlaves | - Number of slave nodes |
| tieRotations | - Flag indicating if rotations of slave nodes follow master node too (if false, only their translations do) |
|
pure virtual |
Adds average multi point constraint: master node follows weighted average motion of slave nodes (rigid body motion that fits their translations best), while slave nodes stay free. Load applied to master node is distributed to slave nodes as forces, and constraint applied to master node holds the average motion of slave nodes.
| masterNode | - Master node index |
| slaveNodes | - Array of slave node indices |
| numSlaves | - Number of slave nodes |
| weights | - Optional array of weights for each slave node (all slave nodes are weighted equally if not given) |
|
pure virtual |
Applies (adds) load to requested node and its DOF. Optional case index is applicable only for linear static analysis with 0 being default. In case of transient response it applies load for current step.
| nodeIndex | - Requested node |
| nodalDofIndex | - Requested DOF of the node |
| value | - Load value to apply |
| loadCaseIndex | - Requested load case (applicable for linear static analysis only, default 0) |
|
pure virtual |
Applies (adds) pressure to requested element and its face. Optional case index is applicable only for linear static analysis with 0 being default. In case of transient response it applies pressure for current step.
| elemIndex | - Requested element |
| faceIndex | - Requested face |
| value | - Pressure value to apply |
| loadCaseIndex | - Requested load case (applicable for linear static analysis only and default=1) |
|
pure virtual |
Returns number of load cases
|
pure virtual |
Sets storage system for system matrices
| storageType | - Matrix storage system |
|
pure virtual |
Sets pressure distribution type
| distributionType | - Pressure distribution type |
|
pure virtual |
Sets eigenvalue performance mode (favoring speed or accuracy)
| mode | - Eigenvalue performance mode |
|
pure virtual |
Sets number of modes for natural frequency analysis.
Number of modes and upper frequency limit select the modes together:
| numModes | - Number of requested natural frequency modes (0: all modes within the frequency limits) |
|
pure virtual |
|
pure virtual |
Sets lower frequency limit for natural frequency analysis
| freqLower | - Lower frequency limit |
|
pure virtual |
|
pure virtual |
Sets upper frequency limit for natural frequency analysis
| freqUpper | - Upper frequency limit (0: no limit, the requested number of lowest modes is extracted) |
|
pure virtual |
|
pure virtual |
Sets number of modes for buckling analysis
Number of modes and upper eigenvalue limit select the modes together:
| numModes | - Number of modes (0: all modes within the eigenvalue limits) |
|
pure virtual |
|
pure virtual |
Sets lower eigenvalue limit for buckling analysis
| eigenvalueLower | - Lower eigenvalue limit |
|
pure virtual |
|
pure virtual |
Sets upper eigenvalue limit for buckling analysis
| eigenvalueUpper | - Upper eigenvalue limit (0 with lower limit that is not negative: no limit, the requested number of lowest modes is extracted) |
|
pure virtual |
|
pure virtual |
Sets whether buckling analysis includes the load stiffness of pressures. A pressure stays normal to its face, so its force turns with the face as the structure deflects; that change enters the geometric stiffness (as Abaqus and Nastran do by default). Without it pressures act as fixed nodal forces, right for a pressure standing for a load that keeps its direction, such as a contact.
| include | - Include the pressure load stiffness (default true) |
|
pure virtual |
|
pure virtual |
Sets time integration step size for transient response analysis
| stepSize | - Time integration step size |
|
pure virtual |
|
pure virtual |
Sets structural damping coefficient for transient response analysis
| structuralDampingCoefficient | - Structural damping coefficient |
|
pure virtual |
|
pure virtual |
Sets structural damping conversion frequency for transient response analysis
| structuralDampingConversionFrequency | - Structural damping conversion frequency |
|
pure virtual |
|
pure virtual |
Runs linear static analysis
|
pure virtual |
Runs natural frequencies analysis
|
pure virtual |
Runs linear buckling analysis
|
pure virtual |
Initializes transient response analysis
|
pure virtual |
Runs transient response analysis step
|
pure virtual |
Returns progress of supported tasks.
|
pure virtual |
Requests termination of supported tasks.
|
pure virtual |
Requests pause of supported tasks.
|
pure virtual |
Requests resume of supported tasks.
|
pure virtual |
Provides displacement value of requested node, DOF, case and task
| nodeIndex | - Requested node |
| dofIndex | - Requested DOF |
| caseIndex | - Requested case |
| displacement | - Displacement value |
| analysisType | - Analysis type (optional, if not provided, active task is assumed) |
|
pure virtual |
Provides number of extracted modes for requested task
| numExtractedModes | - Number of extracted modes |
| analysisType | - Analysis type (optional, if not provided, active task is assumed) |
|
pure virtual |
Provides eigenvalue of requested mode and task
| modeIndex | - Requested mode |
| eigenvalue | - Eigenvalue of requested mode index |
| analysisType | - Analysis type (optional, if not provided, active task is assumed) |
|
pure virtual |
Provides eigenfrequency of requested mode index and task
| modeIndex | - Requested mode |
| eigenfrequency | - Eigenfrequency of requested mode |
| analysisType | - Analysis type (optional, if not provided, active task is assumed) |
|
pure virtual |
Provides eigenvector value of requested node, DOF, mode index and task
| nodeIndex | - Requested node |
| dofIndex | - Requested DOF |
| modeIndex | - Requested mode |
| eigenvector | - Eigenvector value |
| analysisType | - Analysis type (optional, if not provided, active task is assumed) |
|
pure virtual |
Provides number of run steps for transient response analysis including initial step
|
pure virtual |
Provides maximum vonMises stress value of requested element, case and task
| elemIndex | - Requested element |
| caseIndex | - Requested case |
| stress | - VonMises stress value |
| analysisType | - Analysis type (optional, if not provided, active task is assumed) |
|
pure virtual |
Clears all materials' data.
|
pure virtual |
Clears all properties' data.
|
pure virtual |
Clears all nodes' data.
|
pure virtual |
Clears all elements' data.
|
pure virtual |
Clears all constraints.
|
pure virtual |
Clears all multi point constraints.
|
pure virtual |
Clears all loads.
|
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).
|
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).