2022-07-22 11:13:45 +02:00
|
|
|
#ifndef CHRONOSIGASIMULATIONMODEL_HPP
|
|
|
|
#define CHRONOSIGASIMULATIONMODEL_HPP
|
|
|
|
|
|
|
|
#include "simulationmodel.hpp"
|
|
|
|
|
|
|
|
namespace chrono {
|
|
|
|
class ChSystemSMC;
|
|
|
|
namespace fea {
|
|
|
|
class ChMesh;
|
|
|
|
class ChNodeFEAxyzrot;
|
|
|
|
} // namespace fea
|
|
|
|
} // namespace chrono
|
|
|
|
|
|
|
|
class ChronosIGASimulationModel : public SimulationModel
|
|
|
|
{
|
|
|
|
std::shared_ptr<chrono::fea::ChMesh> mesh_chronos;
|
|
|
|
std::vector<std::shared_ptr<chrono::fea::ChNodeFEAxyzrot>> edgeMeshVertsToChronoNodes;
|
|
|
|
|
|
|
|
static void parseConstrainedVertices(
|
|
|
|
const std::shared_ptr<const SimulationJob> &pJob,
|
|
|
|
const std::vector<std::shared_ptr<chrono::fea::ChNodeFEAxyzrot>> &edgeMeshVertsToChronoNodes,
|
|
|
|
chrono::ChSystemSMC &my_system);
|
|
|
|
static void parseForces(
|
|
|
|
const std::shared_ptr<chrono::fea::ChMesh> &mesh_chronos,
|
|
|
|
const std::vector<std::shared_ptr<chrono::fea::ChNodeFEAxyzrot>> &edgeMeshVertsToChronoNodes,
|
|
|
|
const std::unordered_map<VertexIndex, Vector6d> &nodalExternalForces);
|
|
|
|
|
|
|
|
public:
|
|
|
|
ChronosIGASimulationModel();
|
|
|
|
SimulationResults executeSimulation(const std::shared_ptr<SimulationJob> &pJob) override;
|
2022-08-08 11:02:14 +02:00
|
|
|
void setStructure(const std::shared_ptr<SimulationEdgeMesh> &pMesh) override;
|
2022-07-22 11:13:45 +02:00
|
|
|
static std::shared_ptr<chrono::fea::ChMesh> convertToChronosMesh_IGA(
|
2022-08-08 11:02:14 +02:00
|
|
|
const std::shared_ptr<SimulationEdgeMesh> &pMesh,
|
2022-07-22 11:13:45 +02:00
|
|
|
std::vector<std::shared_ptr<chrono::fea::ChNodeFEAxyzrot>> &edgeMeshVertsToChronosNodes);
|
|
|
|
|
|
|
|
inline const static std::string label{"Chronos_linear_IGA"};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CHRONOSIGASIMULATIONMODEL_HPP
|