Skip to content

Commit

Permalink
FEM: calculix writer, use better writing for young's modulus, improves
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Jul 13, 2021
1 parent 2fe036e commit 74c3a4f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Mod/Fem/femsolver/calculix/write_femelement_material.py
Expand Up @@ -88,14 +88,7 @@ def is_density_needed():
f.write("*MATERIAL, NAME=" + mat_name + "\n")
if mat_obj.Category == "Solid":
f.write("*ELASTIC\n")
# FIXME https://forum.freecadweb.org/viewtopic.php?f=18&t=60066&p=516434#p516433
if YM_in_MPa >= 1000:
f.write("{0:.0f}, {1:.3f}\n".format(YM_in_MPa, PR))
else:
# may be not suited for structural engineerings but such soft materials exist ;-)
# https://forum.freecadweb.org/viewtopic.php?f=18&t=60066
f.write("{0:.3e}, {1:.3f}\n".format(YM_in_MPa, PR))

f.write("{0:.13G}, {1:.3f}\n".format(YM_in_MPa, PR))
if is_density_needed() is True:
f.write("*DENSITY\n")
f.write("{0:.3e}\n".format(density_in_tonne_per_mm3))
Expand Down

0 comments on commit 74c3a4f

Please sign in to comment.