|
FEDEM Model Database
R8.0
Source code of the FEDEM model database
|
FEDEM model database utilities. More...
Functions | |
| FmTriad * | createTriad (const FaVec3 &createPos, FmBase *onObject=NULL) |
| Creates a triad. More... | |
| void | createRevJoint (const FaVec3 &createPos, const FaVec3 &zAxisDir) |
| Creates a revolute joint object. More... | |
| void | createBallJoint (const FaVec3 &createPos) |
| Creates a ball joint object. More... | |
| void | createRigidJoint (const FaVec3 &createPos) |
| Creates a rigid joint object. More... | |
| void | createFreeJoint (const FaVec3 &posJnt, const FaVec3 &posDep, const FaVec3 *zAxisDir=NULL) |
| Creates a free joint object. More... | |
| void | createJoint (int jType, const FaVec3 &firstPoint, const FaVec3 &lastPoint, const FaVec3 &yAxisDir) |
| Creates a line joint object. More... | |
| FmJointBase * | createJoint (int jType, FmBase *first, FmBase *second, const FaVec3 *posJnt=NULL, FmBase *subAssembly=NULL) |
| Creates a point joint connected to two triads. More... | |
| FmJointBase * | createJoint (int jType, FmBase *first, FmBase *last, const FaVec3 &yAxisDir, FmBase *slider=NULL, FmBase *subAssembly=NULL, char addBetweens=2) |
| Creates a line joint between two triads. More... | |
| FmCamJoint * | createCamJoint (FmTriad *follower, FmBase *subAssembly=NULL) |
| Creates a cam joint. More... | |
| FmAxialSpring * | createAxialSpring (FmTriad *first, FmTriad *second, FmBase *subAssembly=NULL) |
| Creates an axial spring between two triads. More... | |
| void | createAxialSpring (const FaVec3 &firstPt, const FaVec3 &secondPt, FmBase *first, FmBase *second) |
| Creates an axial spring between two points on two objects. More... | |
| FmAxialDamper * | createAxialDamper (FmTriad *first, FmTriad *second, FmBase *subAssembly=NULL) |
| Creates an axial damper between two triads. More... | |
| void | createAxialDamper (const FaVec3 &firstPt, const FaVec3 &secondPt, FmBase *first, FmBase *second) |
| Creates an axial damper between two points on two objects. More... | |
| FmLoad * | createLoad (int lType, const FaVec3 &createPos, FaVec3 globalDir, FmBase *onObject=NULL, FmBase *subAssembly=NULL) |
| Creates an external load object. More... | |
| void | createSticker (FmBase *object, const FaVec3 &createPoint) |
| Creates a sticker on an object. More... | |
| void | createSticker (const FaVec3 &createPoint, FmBase *onObject) |
| Creates a sticker on an object. More... | |
| void | createGear (FmBase *first, FmBase *second) |
| Creates a gear object. More... | |
| void | createRackPinion (FmBase *first, FmBase *second) |
| Creates a rack & pinion object. More... | |
| FmSensorBase * | createSensor (FmIsMeasuredBase *object) |
| Creates a simple sensor on an object. More... | |
| FmSensorBase * | createSensor (FmIsMeasuredBase *first, FmIsMeasuredBase *second, FmIsMeasuredBase *third=NULL, FmIsMeasuredBase *fourth=NULL) |
| Creates a relative sensor between two or four objects. More... | |
| void | createTire (FmRevJoint *joint) |
| Creates a tire object. More... | |
| FmBeam * | createBeam (FmTriad *tr1, FmTriad *tr2, FmBase *subAssembly=NULL) |
| Creates a single beam element. More... | |
| FmModelMemberBase * | createBeams (const std::vector< FmTriad * > &triads, FmBase *subAssembly=NULL) |
| Creates a beam string. More... | |
| FmModelMemberBase * | createPart (const std::vector< FmTriad * > &triads, FmBase *subAssembly=NULL) |
| Creates a generic part. More... | |
| FmModelMemberBase * | createUserElm (const std::vector< FmTriad * > &triads, FmBase *subAssembly=NULL) |
| Creates a user-defined element. More... | |
| FmModelMemberBase * | createUserElm (int elmType, const char *typeName, const std::vector< FmTriad * > &triads, size_t nelnod, FmBase *subAssembly=NULL) |
| Creates user-defined elements. More... | |
| bool | createMooringLine (FmTriad *tr1, FmTriad *tr2, double Length, int nSegment, int elmType, FmBase *subAssembly=NULL) |
| Creates a mooring line (macro object) between two triads. More... | |
| FmSubAssembly * | createSubAssembly (const std::vector< FmModelMemberBase * > &objs, FmBase *subAssembly=NULL) |
| Creates sub-assembly containing the specified objects. More... | |
| int | loadTemplate (const std::string &newName, const std::string &defaultName="", bool writeLogFile=false) |
| Reads a model file to be used as template for a new, empty model. More... | |
| int | loadModel (const std::string &name, const std::string &logName, char ignoreFileVersion=0) |
| Reads a model file into a new model. More... | |
| bool | loadParts (bool forceLoad=false) |
| Reads all part data files, unless they are already loaded. More... | |
| bool | validFileCheck (const std::string &filename, unsigned long int wantCS=0, std::string *missingFile=NULL, int *wrongCS=NULL) |
| Helper to check whether a named fmx-file is valid or not. More... | |
| int | checkReducerFiles (const FmPart *part, bool needMassMatrix=false, char checkingWhich='A', bool preparingForBatch=false, unsigned long int wantCS=0) |
| Checks the validity of the reduced matrix files of a part. More... | |
| std::string | createReducerInput (FmAnalysis *analysis, FmMechanism *mech, FmPart *part, const std::string &solverName, bool preparingForBatch=false, unsigned long int wantCS=0) |
| Creates input files for the FE part reducer. More... | |
| std::string | createSolverInput (FmAnalysis *analysis, FmMechanism *mech, FmSimulationEvent *sev, const std::string &solverName, const std::vector< std::string > &plugins, std::vector< std::string > &rdbPath, bool preparingForBatch=false, bool keepOldRes=true) |
| Creates input files for the dynamics solver. More... | |
FEDEM model database utilities.
| int Fedem::checkReducerFiles | ( | const FmPart * | part, |
| bool | needMassMatrix = false, |
||
| char | checkingWhich = 'A', |
||
| bool | preparingForBatch = false, |
||
| unsigned long int | wantCS = 0 |
||
| ) |
Checks the validity of the reduced matrix files of a part.
| [in] | part | The FE part to check matrix files for |
| [in] | needMassMatrix | If true, mass matrix files are needed |
| [in] | checkingWhich | Flag indicating which files to check for.
|
| [in] | preparingForBatch | If true, prepare for batch execution |
| [in] | wantCS | Expected checksum value (ignore if zero) |
| void Fedem::createAxialDamper | ( | const FaVec3 & | firstPt, |
| const FaVec3 & | secondPt, | ||
| FmBase * | first, | ||
| FmBase * | second | ||
| ) |
Creates an axial damper between two points on two objects.
| [in] | firstPt | First point the damper is acting between |
| [in] | secondPt | Second point the damper is acting between |
| [in] | first | First object the damper is acting between |
| [in] | second | Second object the damper is acting between |
| FmAxialDamper * Fedem::createAxialDamper | ( | FmTriad * | first, |
| FmTriad * | second, | ||
| FmBase * | subAssembly = NULL |
||
| ) |
Creates an axial damper between two triads.
| [in] | first | First triad the damper is acting between |
| [in] | second | Second triad the damper is acting between |
| [in] | subAssembly | Parent assembly of the damper |
| void Fedem::createAxialSpring | ( | const FaVec3 & | firstPt, |
| const FaVec3 & | secondPt, | ||
| FmBase * | first, | ||
| FmBase * | second | ||
| ) |
Creates an axial spring between two points on two objects.
| [in] | firstPt | First point the spring is acting between |
| [in] | secondPt | Second point the spring is acting between |
| [in] | first | First object the spring is acting between |
| [in] | second | Second object the spring is acting between |
| FmAxialSpring * Fedem::createAxialSpring | ( | FmTriad * | first, |
| FmTriad * | second, | ||
| FmBase * | subAssembly = NULL |
||
| ) |
Creates an axial spring between two triads.
| [in] | first | First triad the spring is acting between |
| [in] | second | Second triad the spring is acting between |
| [in] | subAssembly | Parent assembly of the spring |
| void Fedem::createBallJoint | ( | const FaVec3 & | createPos | ) |
Creates a ball joint object.
| [in] | createPos | Global joint position |
Creates a single beam element.
| [in] | tr1 | First end triad |
| [in] | tr2 | Second end triad |
| [in] | subAssembly | Parent assembly of the beam element |
| FmModelMemberBase * Fedem::createBeams | ( | const std::vector< FmTriad * > & | triads, |
| FmBase * | subAssembly = NULL |
||
| ) |
Creates a beam string.
| [in] | triads | List of triads connected to the created beam elements |
| [in] | subAssembly | Parent assembly of the created beam elements |
| FmCamJoint * Fedem::createCamJoint | ( | FmTriad * | follower, |
| FmBase * | subAssembly = NULL |
||
| ) |
Creates a cam joint.
| [in] | follower | Follower triad |
| [in] | subAssembly | Parent assembly of the cam joint |
| void Fedem::createFreeJoint | ( | const FaVec3 & | posJnt, |
| const FaVec3 & | posDep, | ||
| const FaVec3 * | zAxisDir = NULL |
||
| ) |
Creates a free joint object.
| [in] | posJnt | Global position of joint and independent triad |
| [in] | posDep | Global position of dependent triad |
| [in] | zAxisDir | Common Z-axis direction for the joint triads |
Creates a gear object.
| [in] | first | Input joint |
| [in] | second | Output joint |
| void Fedem::createJoint | ( | int | jType, |
| const FaVec3 & | firstPoint, | ||
| const FaVec3 & | lastPoint, | ||
| const FaVec3 & | yAxisDir | ||
| ) |
Creates a line joint object.
| [in] | jType | Type of joint to create (class type ID) |
| [in] | firstPoint | Start point of line |
| [in] | lastPoint | End point of line |
| [in] | yAxisDir | Y-axis direction for the independent triads |
| FmJointBase * Fedem::createJoint | ( | int | jType, |
| FmBase * | first, | ||
| FmBase * | last, | ||
| const FaVec3 & | yAxisDir, | ||
| FmBase * | slider = NULL, |
||
| FmBase * | subAssembly = NULL, |
||
| char | addBetweens = 2 |
||
| ) |
Creates a line joint between two triads.
| [in] | jType | Type of joint to create (class type ID) |
| [in] | first | Start triad of joint line |
| [in] | last | End triad of joint line |
| [in] | yAxisDir | Y-axis direction for the independent triads |
| [in] | slider | Dependent triad of the joint |
| [in] | subAssembly | Parent assembly of the joint |
| [in] | addBetweens | Flag for adding other triads found along the line
|
| FmJointBase * Fedem::createJoint | ( | int | jType, |
| FmBase * | first, | ||
| FmBase * | second, | ||
| const FaVec3 * | posJnt = NULL, |
||
| FmBase * | subAssembly = NULL |
||
| ) |
Creates a point joint connected to two triads.
| [in] | jType | Type of joint to create (class type ID) |
| [in] | first | The independent triad or reference plane |
| [in] | second | The dependent triad |
| [in] | posJnt | Global position of independent triad, if new |
| [in] | subAssembly | Parent assembly of the joint |
| FmLoad * Fedem::createLoad | ( | int | lType, |
| const FaVec3 & | createPos, | ||
| FaVec3 | globalDir, | ||
| FmBase * | onObject = NULL, |
||
| FmBase * | subAssembly = NULL |
||
| ) |
Creates an external load object.
| [in] | lType | Type of load (0=force, 1=torque) |
| [in] | createPos | Load attack point |
| [in] | globalDir | Load direction vector |
| [in] | onObject | Object the load is acting on |
| [in] | subAssembly | Parent assembly of the load object |
| bool Fedem::createMooringLine | ( | FmTriad * | tr1, |
| FmTriad * | tr2, | ||
| double | Length, | ||
| int | nSegments, | ||
| int | elmType, | ||
| FmBase * | subAssembly = NULL |
||
| ) |
Creates a mooring line (macro object) between two triads.
| [in] | tr1 | Start triad of mooring line |
| [in] | tr2 | Stop triad of mooring line |
| [in] | Length | Total length of mooring line |
| [in] | nSegments | Number of elements to divide the mooring line into |
| [in] | elmType | The element type to use |
| [in] | subAssembly | Parent assembly of the mooring line |
This function creates a catenary curve of the specified length between the two triads consisting of nSegment 2-noded elements of the specified type.
| FmModelMemberBase * Fedem::createPart | ( | const std::vector< FmTriad * > & | triads, |
| FmBase * | subAssembly = NULL |
||
| ) |
Creates a generic part.
| [in] | triads | List of triads connected to the created part |
| [in] | subAssembly | Parent assembly of the created part |
Creates a rack & pinion object.
| [in] | first | Input joint |
| [in] | second | Output joint |
| std::string Fedem::createReducerInput | ( | FmAnalysis * | analysis, |
| FmMechanism * | mech, | ||
| FmPart * | part, | ||
| const std::string & | solverName, | ||
| bool | preparingForBatch = false, |
||
| unsigned long int | wantCS = 0 |
||
| ) |
Creates input files for the FE part reducer.
| [in] | analysis | The analysis object of current model |
| [in] | mech | The mechanism object of current model |
| [in] | part | The FE part to create reduction input files for |
| [in] | solverName | Name of reduction solver (fedem_reducer) |
| [in] | preparingForBatch | If true, prepare for batch execution |
| [in] | wantCS | Expected checksum value (ignore if zero) |
Creates a revolute joint object.
| [in] | createPos | Global joint position |
| [in] | zAxisDir | The axis of revolution |
Both joint triads use zAxisDir as their z-axis and the "up" direction of the joint is in negative g-direction.
| void Fedem::createRigidJoint | ( | const FaVec3 & | createPos | ) |
Creates a rigid joint object.
| [in] | createPos | Global joint position |
| FmSensorBase * Fedem::createSensor | ( | FmIsMeasuredBase * | first, |
| FmIsMeasuredBase * | second, | ||
| FmIsMeasuredBase * | third = NULL, |
||
| FmIsMeasuredBase * | fourth = NULL |
||
| ) |
Creates a relative sensor between two or four objects.
| [in] | first | The first object to measure between |
| [in] | second | The second object to measure between |
| [in] | third | The third object to measure between |
| [in] | fourth | The dourth object to measure between |
| FmSensorBase * Fedem::createSensor | ( | FmIsMeasuredBase * | object | ) |
Creates a simple sensor on an object.
| [in] | object | The object to measure |
| std::string Fedem::createSolverInput | ( | FmAnalysis * | analysis, |
| FmMechanism * | mech, | ||
| FmSimulationEvent * | sev, | ||
| const std::string & | solverName, | ||
| const std::vector< std::string > & | plugins, | ||
| std::vector< std::string > & | rdbPath, | ||
| bool | preparingForBatch = false, |
||
| bool | keepOldRes = true |
||
| ) |
Creates input files for the dynamics solver.
| [in] | analysis | The analysis object of current model |
| [in] | mech | The mechanism object of current model |
| [in] | sev | The simulation event (if any) to create input for |
| [in] | solverName | Name of the dynamics solver (fedem_solver) |
| [in] | plugins | Paths to solver plugin libraries |
| [in] | rdbPath | List of absolute paths of RDB-folders to be used |
| [in] | preparingForBatch | If true, prepare for batch execution |
| [in] | keepOldRes | if true, any existing res-file is not overwritten |
Creates a sticker on an object.
| [in] | createPoint | Location of sticker |
| [in] | onObject | Object to put the sticker on |
Creates a sticker on an object.
| [in] | object | Object to put the sticker on |
| [in] | createPoint | Location of sticker |
| FmSubAssembly * Fedem::createSubAssembly | ( | const std::vector< FmModelMemberBase * > & | objs, |
| FmBase * | subAssembly = NULL |
||
| ) |
Creates sub-assembly containing the specified objects.
| [in] | objs | Objects to move to the new sub-assembly |
| [in] | subAssembly | Parent assembly of the new sub-assembly |
| void Fedem::createTire | ( | FmRevJoint * | joint | ) |
Creates a tire object.
| [in] | joint | The revolute joint representing the wheel bearing |
Creates a triad.
| [in] | createPos | Global position of the triad |
| [in] | onObject | If this is a Part, the triad is attached to it. If it is a sub-assembly, that sub-assembly is set as the triad's parent. |
| FmModelMemberBase * Fedem::createUserElm | ( | const std::vector< FmTriad * > & | triads, |
| FmBase * | subAssembly = NULL |
||
| ) |
Creates a user-defined element.
| [in] | triads | List of triads connected to the created element |
| [in] | subAssembly | Parent assembly of the created element |
| FmModelMemberBase * Fedem::createUserElm | ( | int | elmType, |
| const char * | typeName, | ||
| const std::vector< FmTriad * > & | triads, | ||
| size_t | nelnod, | ||
| FmBase * | subAssembly = NULL |
||
| ) |
Creates user-defined elements.
| [in] | elmType | Element type ID |
| [in] | typeName | Element type name |
| [in] | triads | List of triads connected to the created element(s) |
| [in] | nelnod | Number of element nodes for the created element(s) |
| [in] | subAssembly | Parent assembly of the created element(s) |
If nelnod equals 1, a user-defined element is created for each of the given triads. If nelnod equals 2, a chain of nelnod-1 elements is created connecting the given triads. If nelnod is larger than 2 (and less than or equal to the size of triads), then one user-defined elements is created connected to the first nelnod triads.
| int Fedem::loadModel | ( | const std::string & | name, |
| const std::string & | logName, | ||
| char | ignoreFileVersion = 0 |
||
| ) |
Reads a model file into a new model.
| [in] | name | The name of the model file to read |
| [in] | logName | Name of the log-file for list view messages |
| [in] | ignoreFileVersion | If > 0, ignore incompatible file versions |
| bool Fedem::loadParts | ( | bool | forceLoad = false | ) |
Reads all part data files, unless they are already loaded.
| [in] | forceLoad | If true, force reload of all files |
| int Fedem::loadTemplate | ( | const std::string & | newName, |
| const std::string & | defaultName = "", |
||
| bool | writeLogFile = false |
||
| ) |
Reads a model file to be used as template for a new, empty model.
| [in] | newName | The name of the new model file |
| [in] | defaultName | Default name of the template model file. Used only if the FEDEM_TEMPLATE_FILE environment variable is not set. |
| [in] | writeLogFile | Copy messages to a temporary log file, if true |
| bool Fedem::validFileCheck | ( | const std::string & | filename, |
| unsigned long int | wantCS = 0, |
||
| std::string * | missingFile = NULL, |
||
| int * | wrongCS = NULL |
||
| ) |
Helper to check whether a named fmx-file is valid or not.
| [in] | filename | Absolute path to the fmx-file to check |
| [in] | wantCS | Expected checksum value (ignore if zero) |
| missingFile | List of non-existing files (optional) | |
| wrongCS | Counts files with checksum mismatch (optional) |