Fem: Force z=0 for plane stress, plane strain and axisymmetric elements in writeABAQUS - fixes #12875

This commit is contained in:
marioalexis
2024-06-11 14:34:10 -03:00
committed by Chris Hennes
parent c9dba8a51e
commit 99aebd8a33
2 changed files with 37 additions and 4 deletions

View File

@@ -2309,6 +2309,30 @@ void FemMesh::writeABAQUS(const std::string& Filename,
// write nodes
anABAQUS_Output << "** Nodes" << std::endl;
anABAQUS_Output << "*Node, NSET=Nall" << std::endl;
// Axisymmetric, plane strain and plane stress elements expect nodes in the plane z=0.
// Set the z coordinate to 0 to avoid possible rounding errors.
switch (faceVariant) {
case ABAQUS_FaceVariant::Stress:
case ABAQUS_FaceVariant::Stress_Reduced:
case ABAQUS_FaceVariant::Strain:
case ABAQUS_FaceVariant::Strain_Reduced:
case ABAQUS_FaceVariant::Axisymmetric:
case ABAQUS_FaceVariant::Axisymmetric_Reduced:
for (const auto& elMap : elementsMapFac) {
const NodesMap& nodeMap = elMap.second;
for (const auto& nodes : nodeMap) {
for (int n : nodes.second) {
Base::Vector3d& vertex = vertexMap[n];
vertex.z = 0.0;
}
}
}
break;
default:
break;
}
// This way we get sorted output.
// See https://forum.freecad.org/viewtopic.php?f=18&t=12646&start=40#p103004
for (const auto& it : vertexMap) {

View File

@@ -77,9 +77,17 @@
<Methode Name="writeABAQUS" Const="true" Keyword="true">
<Documentation>
<UserDocu>Write out as ABAQUS inp
writeABAQUS(file, int elemParam, bool groupParam)
elemParam: 0 = all elements, 1 = highest elements only, 2 = FEM elements only (only edges not belonging to faces and faces not belonging to volumes)
groupParam: true = write group data, false = do not write group data
writeABAQUS(file, int elemParam, bool groupParam, str volVariant, str faceVariant, str edgeVariant)
elemParam:
0: All elements
1: Highest elements only
2: FEM elements only (only edges not belonging to faces and faces not belonging to volumes)
groupParam:
True: Write group data
False: Do not write group data
volVariant: Volume elements
"standard": Tetra4 -> C3D4, Penta6 -> C3D6, Hexa8 -> C3D8, Tetra10 -> C3D10, Penta15 -> C3D15, Hexa20 -> C3D20
"reduced": Hexa8 -> C3D8R, Hexa20 -> C3D20R
@@ -107,7 +115,8 @@
Elements are selected according to CalculiX availability.
For example if volume variant "modified" is selected, Tetra10 mesh
elements are assigned to C3D10T and remain elements uses "standard"</UserDocu>
elements are assigned to C3D10T and remain elements uses "standard".
Axisymmetric, plane strain and plane stress elements expect nodes in the plane z=0.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setTransform">