Adds 'solve' function to ASMTAssembly.
Simplify runSinglePendulumSuperSimplified() more
This commit is contained in:
@@ -64,18 +64,12 @@ void MbD::ASMTAssembly::runSinglePendulumSuperSimplified()
|
||||
mkr->setPosition3D(0.1, 0.1, 0.1);
|
||||
part->addMarker(mkr);
|
||||
|
||||
auto joint = CREATE<ASMTRevoluteJoint>::With();
|
||||
auto joint = CREATE<ASMTFixedJoint>::With();
|
||||
joint->setName("Joint1");
|
||||
joint->setMarkerI("/Assembly1/Marker1");
|
||||
joint->setMarkerJ("/Assembly1/Part1/Marker1");
|
||||
assembly->addJoint(joint);
|
||||
|
||||
auto motion = CREATE<ASMTRotationalMotion>::With();
|
||||
motion->setName("Motion1");
|
||||
motion->setMotionJoint("/Assembly1/Joint1");
|
||||
motion->setRotationZ("0.0");
|
||||
assembly->addMotion(motion);
|
||||
|
||||
auto simulationParameters = CREATE<ASMTSimulationParameters>::With();
|
||||
simulationParameters->settstart(0.0);
|
||||
simulationParameters->settend(0.0); //tstart == tend Initial Conditions only.
|
||||
@@ -851,6 +845,20 @@ void MbD::ASMTAssembly::createMbD(std::shared_ptr<System> mbdSys, std::shared_pt
|
||||
animationParameters = nullptr;
|
||||
}
|
||||
|
||||
void MbD::ASMTAssembly::solve()
|
||||
{
|
||||
auto simulationParameters = CREATE<ASMTSimulationParameters>::With();
|
||||
simulationParameters->settstart(0.0);
|
||||
simulationParameters->settend(0.0); //tstart == tend Initial Conditions only.
|
||||
simulationParameters->sethmin(1.0e-9);
|
||||
simulationParameters->sethmax(1.0);
|
||||
simulationParameters->sethout(0.04);
|
||||
simulationParameters->seterrorTol(1.0e-6);
|
||||
setSimulationParameters(simulationParameters);
|
||||
|
||||
runKINEMATIC();
|
||||
}
|
||||
|
||||
void MbD::ASMTAssembly::runKINEMATIC()
|
||||
{
|
||||
auto mbdSystem = CREATE<System>::With();
|
||||
|
||||
@@ -79,6 +79,10 @@ namespace MbD {
|
||||
std::shared_ptr<std::map<std::string, std::shared_ptr<ASMTMarker>>>markerMap();
|
||||
void deleteMbD();
|
||||
void createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits) override;
|
||||
|
||||
/* This function performs a one shot solve of the assembly.*/
|
||||
void solve();
|
||||
|
||||
void runKINEMATIC();
|
||||
void initprincipalMassMarker();
|
||||
std::shared_ptr<ASMTSpatialContainer> spatialContainerAt(std::shared_ptr<ASMTAssembly> self, std::string& longname);
|
||||
|
||||
Reference in New Issue
Block a user