Changed 1e10 to 1e9 as ym

This commit is contained in:
Iason 2021-01-14 16:30:13 +02:00
parent 2e7aa6e1e0
commit a71efffe14
2 changed files with 9 additions and 11 deletions

View File

@ -37,7 +37,7 @@ struct ElementMaterial {
: G(poissonsRatio), E(youngsModulus) { : G(poissonsRatio), E(youngsModulus) {
assert(poissonsRatio <= 0.5 && poissonsRatio >= -1); assert(poissonsRatio <= 0.5 && poissonsRatio >= -1);
} }
ElementMaterial() : G(0.3), E(200 * 1e10) {} ElementMaterial() : G(0.3), E(200 * 1e9) {}
}; };
#endif // BEAM_HPP #endif // BEAM_HPP

View File

@ -24,7 +24,7 @@ void FormFinder::runUnitTests() {
fixedVertices[0] = std::unordered_set<DoFType>{0, 1, 2, 3}; fixedVertices[0] = std::unordered_set<DoFType>{0, 1, 2, 3};
fixedVertices[beam.VN() - 1] = std::unordered_set<DoFType>{1, 2}; fixedVertices[beam.VN() - 1] = std::unordered_set<DoFType>{1, 2};
std::unordered_map<VertexIndex, Vector6d> nodalForces{ std::unordered_map<VertexIndex, Vector6d> nodalForces{
{2, Vector6d({0, 1000, 1000, 0, 0, 0})}}; {beam.VN() / 2, Vector6d({0, 1000, 1000, 0, 0, 0})}};
// Forced displacements // Forced displacements
std::unordered_map<size_t, Eigen::Vector3d> nodalForcedDisplacements; std::unordered_map<size_t, Eigen::Vector3d> nodalForcedDisplacements;
nodalForcedDisplacements.insert({beam.VN() - 1, Eigen::Vector3d(-0.2, 0, 0)}); nodalForcedDisplacements.insert({beam.VN() - 1, Eigen::Vector3d(-0.2, 0, 0)});
@ -34,7 +34,7 @@ void FormFinder::runUnitTests() {
// SimulationJob::constructFixedVerticesSpanGrid(spanGridSize, // SimulationJob::constructFixedVerticesSpanGrid(spanGridSize,
// mesh.VN()), // mesh.VN()),
fixedVertices, nodalForces, nodalForcedDisplacements}; fixedVertices, nodalForces, nodalForcedDisplacements};
beamSimulationJob.pMesh->setBeamMaterial(0.3, 200 * 1e10); beamSimulationJob.pMesh->setBeamMaterial(0.3, 200 * 1e9);
assert(CrossSectionType::name == CylindricalBeamDimensions::name); assert(CrossSectionType::name == CylindricalBeamDimensions::name);
beamSimulationJob.pMesh->setBeamCrossSection(CrossSectionType{0.03, 0.026}); beamSimulationJob.pMesh->setBeamCrossSection(CrossSectionType{0.03, 0.026});
@ -91,7 +91,7 @@ void FormFinder::runUnitTests() {
fixedVertices, fixedVertices,
{}, {},
nodalForcedDisplacements}; nodalForcedDisplacements};
shortSpanGridshellSimulationJob.pMesh->setBeamMaterial(0.3, 200 * 1e10); shortSpanGridshellSimulationJob.pMesh->setBeamMaterial(0.3, 200 * 1e9);
assert(typeid(CrossSectionType) == typeid(CylindricalBeamDimensions)); assert(typeid(CrossSectionType) == typeid(CylindricalBeamDimensions));
shortSpanGridshellSimulationJob.pMesh->setBeamCrossSection( shortSpanGridshellSimulationJob.pMesh->setBeamCrossSection(
CrossSectionType{0.03, 0.026}); CrossSectionType{0.03, 0.026});
@ -169,7 +169,7 @@ void FormFinder::runUnitTests() {
fixedVertices, fixedVertices,
{}, {},
nodalForcedDisplacements}; nodalForcedDisplacements};
longSpanGridshell_simulationJob.pMesh->setBeamMaterial(0.3, 200 * 1e10); longSpanGridshell_simulationJob.pMesh->setBeamMaterial(0.3, 200 * 1e9);
if (typeid(CrossSectionType) != typeid(CylindricalBeamDimensions)) { if (typeid(CrossSectionType) != typeid(CylindricalBeamDimensions)) {
std::cerr << "A cylindrical cross section is expected for running the " std::cerr << "A cylindrical cross section is expected for running the "
"paper examples." "paper examples."
@ -1371,11 +1371,9 @@ void FormFinder::applyForcedDisplacements(
VectorType displacementVector(vertexDisplacement(0), vertexDisplacement(1), VectorType displacementVector(vertexDisplacement(0), vertexDisplacement(1),
vertexDisplacement(2)); vertexDisplacement(2));
mesh->vert[vi].P() = node.initialLocation + displacementVector; mesh->vert[vi].P() = node.initialLocation + displacementVector;
// node.displacements = Vector6d( node.displacements = Vector6d(
// {vertexDisplacement(0), vertexDisplacement(1), {vertexDisplacement(0), vertexDisplacement(1), vertexDisplacement(2),
// vertexDisplacement(2), node.displacements[3], node.displacements[4], node.displacements[5]});
// node.displacements[3], node.displacements[4],
// node.displacements[5]});
} }
if (mSettings.shouldDraw) { if (mSettings.shouldDraw) {
@ -1920,7 +1918,7 @@ currentSimulationStep > maxDRMIterations*/
break; break;
} }
// Residual forces norm convergence // Residual forces norm convergence
if (mesh->previousTotalKineticEnergy >= mesh->currentTotalKineticEnergy if (mesh->previousTotalKineticEnergy > mesh->currentTotalKineticEnergy
/*|| /*||
mesh->previousTotalPotentialEnergykN > mesh->previousTotalPotentialEnergykN >
mesh->currentTotalPotentialEnergykN*/ mesh->currentTotalPotentialEnergykN*/