Refactoring. Uses new dimension function

This commit is contained in:
iasonmanolas 2022-07-19 14:49:32 +03:00
parent 8f80c654b2
commit 96e63d15a3
1 changed files with 6 additions and 5 deletions

View File

@ -5,6 +5,7 @@
#include <chrono/fea/ChLoadsBeam.h>
#include <chrono/fea/ChMesh.h>
#include <chrono/fea/ChNodeFEAxyzrot.h>
#include <chrono/physics/ChBody.h>
#include <chrono/physics/ChSystemSMC.h>
#include <chrono/solver/ChIterativeSolverLS.h>
@ -39,8 +40,8 @@ std::shared_ptr<ChMesh> ChronosEulerSimulationModel::convertToChronosMesh_Euler(
const auto vi1 = pMesh->getIndex(edge.cV(1));
//define cross section
const Element &element = pMesh->elements[ei];
const double beam_wz = element.dimensions.b;
const double beam_wy = element.dimensions.h;
const double beam_wz = element.dimensions.getDim1();
const double beam_wy = element.dimensions.getDim2();
const double E = element.material.youngsModulus;
// const double poisson = element.material.poissonsRatio;
const double density = 1e0;
@ -182,11 +183,11 @@ SimulationResults ChronosEulerSimulationModel::executeSimulation(
auto solver = chrono_types::make_shared<ChSolverMINRES>();
my_system.SetSolver(solver);
// solver->SetMaxIterations(100);
// solver->SetTolerance(1e-8);
solver->SetMaxIterations(1e5);
// solver->SetTolerance(1e-12);
solver->EnableWarmStart(true); // IMPORTANT for convergence when using EULER_IMPLICIT_LINEARIZED
solver->EnableDiagonalPreconditioner(true);
// my_system.SetSolverForceTolerance(1e-6);
my_system.SetSolverForceTolerance(1e-9);
solver->SetVerbose(false);
SimulationResults simulationResults;