FEM: Force consistent DENSITY formatting
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
parent
5e3dc0c2c9
commit
15d7369de8
|
@ -128,9 +128,9 @@ class inp_writer:
|
|||
f.write('{}, \n'.format(YM_in_MPa))
|
||||
f.write('{0:.3f}\n'.format(PR))
|
||||
density = FreeCAD.Units.Quantity(mat_obj.Material['Density'])
|
||||
density_in_kg_per_mm3 = density.getValueAs('t/mm^3')
|
||||
density_in_tone_per_mm3 = float(density.getValueAs('t/mm^3'))
|
||||
f.write('*DENSITY \n')
|
||||
f.write('{}, \n'.format(density_in_kg_per_mm3))
|
||||
f.write('{0:.3e}, \n'.format(density_in_tone_per_mm3))
|
||||
# write element properties
|
||||
if len(self.material_objects) == 1:
|
||||
f.write('*SOLID SECTION, ELSET=' + mat_obj_name + ', MATERIAL=' + mat_name + '\n')
|
||||
|
|
|
@ -454,7 +454,7 @@ Eall
|
|||
20000 ,
|
||||
0.360
|
||||
*DENSITY
|
||||
1e-09 ,
|
||||
1.000e-09,
|
||||
*SOLID SECTION, ELSET=MechanicalMaterial, MATERIAL=Test Material
|
||||
|
||||
***********************************************************
|
||||
|
|
Loading…
Reference in New Issue
Block a user