[FEM] Elmer output material name

- when looking at the Elmer input file 'case.sif' it is extremely helpful to thee also the name of the material
  Since the name is only form info, this does not change the actual simulation
This commit is contained in:
Uwe
2023-02-04 19:27:00 +01:00
parent 1b43baa418
commit b8ce56b5e6
6 changed files with 9 additions and 0 deletions

View File

@@ -803,6 +803,7 @@ class Writer(object):
"There are two or more materials with empty references.\n\n"
"Set for the materials to what solid they belong to.\n"
)
self._material(name, "Name", m["Name"])
if density_needed is True:
self._material(
name, "Density",
@@ -935,6 +936,7 @@ class Writer(object):
if obj.References
else self._getAllBodies())
for name in (n for n in refs if n in bodies):
self._material(name, "Name", m["Name"])
if "RelativePermittivity" in m:
self._material(
name, "Relative Permittivity",
@@ -1138,6 +1140,7 @@ class Writer(object):
if obj.References
else self._getAllBodies())
for name in (n for n in refs if n in bodies):
self._material(name, "Name", m["Name"])
if "Density" in m:
self._material(
name, "Density",
@@ -1564,6 +1567,7 @@ class Writer(object):
raise WriteError(
"Used material does not specify the necessary 'Density'."
)
self._material(name, "Name", m["Name"])
self._material(
name, "Density",
self._getDensity(m))

View File

@@ -44,6 +44,7 @@ Body 1
End
Material 1
Name = String "Steel-Generic"
Poisson ratio = Real 0.3
Youngs Modulus = Real 200000000000.0
End

View File

@@ -44,6 +44,7 @@ Body 1
End
Material 1
Name = String "CalculiX-Steel"
Poisson ratio = Real 0.3
Youngs Modulus = Real 210000000000.0
End

View File

@@ -44,6 +44,7 @@ Body 1
End
Material 1
Name = String "CalculiX-Steel"
Poisson ratio = Real 0.3
Youngs Modulus = Real 210000000000.0
End

View File

@@ -44,6 +44,7 @@ Body 1
End
Material 1
Name = String "CalculiX-Steel"
Poisson ratio = Real 0.3
Youngs Modulus = Real 210000000000.0
End

View File

@@ -44,6 +44,7 @@ Body 1
End
Material 1
Name = String "CalculiX-Steel"
Poisson ratio = Real 0.3
Youngs Modulus = Real 210000000000.0
End