FEM: calculix writer, force constraint, do not write zero loads

This commit is contained in:
Bernd Hahnebach
2021-08-02 11:12:47 +02:00
parent 52900b40b0
commit 00a6821903
5 changed files with 6 additions and 24 deletions

View File

@@ -47,17 +47,20 @@ def write_meshdata_constraint(f, femobj, force_obj, ccxwriter):
# floats read from ccx should use {:.13G}, see comment in writer module
direction_vec = femobj["Object"].DirectionVector
dir_zero_tol = 1e-15 # TODO: should this be more generally for more values?
# be careful with raising the tolerance, a big load would have an impact
# but compared to the real direction the impact would be small again
for ref_shape in femobj["NodeLoadTable"]:
f.write("** {}\n".format(ref_shape[0]))
for n in sorted(ref_shape[1]):
node_load = ref_shape[1][n]
if (direction_vec.x != 0.0):
if abs(direction_vec.x) > dir_zero_tol:
v1 = "{:.13E}".format(direction_vec.x * node_load)
f.write("{},1,{}\n".format(n, v1))
if (direction_vec.y != 0.0):
if abs(direction_vec.y) > dir_zero_tol:
v2 = "{:.13E}".format(direction_vec.y * node_load)
f.write("{},2,{}\n".format(n, v2))
if (direction_vec.z != 0.0):
if abs(direction_vec.z) > dir_zero_tol:
v3 = "{:.13E}".format(direction_vec.z * node_load)
f.write("{},3,{}\n".format(n, v3))
f.write("\n")

View File

@@ -107,11 +107,8 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node loads on shape: CanileverPlate:Edge3
3,2,-4.9960036108132E-10
3,3,-2.2500000000000E+06
4,2,-4.9960036108132E-10
4,3,-2.2500000000000E+06
13,2,-9.9920072216264E-10
13,3,-4.5000000000000E+06

View File

@@ -95,15 +95,10 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node loads on shape: CanileverPlate:Edge3
3,2,-1.6653345369377E-10
3,3,-7.5000000000000E+05
4,2,-1.6653345369377E-10
4,3,-7.5000000000000E+05
11,2,-3.3306690738755E-10
11,3,-1.5000000000000E+06
12,2,-6.6613381477509E-10
12,3,-3.0000000000000E+06
13,2,-6.6613381477509E-10
13,3,-3.0000000000000E+06

View File

@@ -1583,21 +1583,13 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node loads on shape: CanileverPlate:Edge3
3,2,-1.4274296030895E-10
3,3,-6.4285714285714E+05
4,2,-1.4274296030895E-10
4,3,-6.4285714285715E+05
64,2,-2.8548592061790E-10
64,3,-1.2857142857143E+06
65,2,-2.8548592061790E-10
65,3,-1.2857142857143E+06
66,2,-2.8548592061790E-10
66,3,-1.2857142857143E+06
67,2,-2.8548592061790E-10
67,3,-1.2857142857143E+06
68,2,-2.8548592061790E-10
68,3,-1.2857142857143E+06
69,2,-2.8548592061790E-10
69,3,-1.2857142857143E+06

View File

@@ -313,15 +313,10 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node loads on shape: CanileverPlate:Edge3
3,2,-1.6653345369377E-10
3,3,-7.5000000000000E+05
4,2,-1.6653345369377E-10
4,3,-7.5000000000000E+05
39,2,-3.3306690738755E-10
39,3,-1.5000000000000E+06
40,2,-6.6613381477509E-10
40,3,-3.0000000000000E+06
41,2,-6.6613381477509E-10
41,3,-3.0000000000000E+06