Skip to content

Commit

Permalink
Merge pull request #12932 from marioalexis84/fem-ccx_force_format
Browse files Browse the repository at this point in the history
Fem: Format force constraint in CalculiX writer - fixes #12805
  • Loading branch information
chennes committed Mar 13, 2024
2 parents 3ed1c30 + d16c384 commit 5264d6c
Show file tree
Hide file tree
Showing 22 changed files with 3,944 additions and 3,944 deletions.
6 changes: 3 additions & 3 deletions src/Mod/Fem/femsolver/calculix/write_constraint_force.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ def write_meshdata_constraint(f, femobj, force_obj, ccxwriter):
node_load = ref_shape[1][n]
# the loads in ref_shape[1][n] are without unit
if abs(direction_vec.x) > dir_zero_tol:
v1 = "{}".format(direction_vec.x * node_load)
v1 = "{:.13G}".format((direction_vec.x * node_load).Value)

Check warning on line 59 in src/Mod/Fem/femsolver/calculix/write_constraint_force.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Formatting a regular string which could be an f-string (consider-using-f-string)
f.write("{},1,{}\n".format(n, v1))

Check warning on line 60 in src/Mod/Fem/femsolver/calculix/write_constraint_force.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Formatting a regular string which could be an f-string (consider-using-f-string)
if abs(direction_vec.y) > dir_zero_tol:
v2 = "{}".format(direction_vec.y * node_load)
v2 = "{:.13G}".format((direction_vec.y * node_load).Value)

Check warning on line 62 in src/Mod/Fem/femsolver/calculix/write_constraint_force.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Formatting a regular string which could be an f-string (consider-using-f-string)
f.write("{},2,{}\n".format(n, v2))

Check warning on line 63 in src/Mod/Fem/femsolver/calculix/write_constraint_force.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Formatting a regular string which could be an f-string (consider-using-f-string)
if abs(direction_vec.z) > dir_zero_tol:
v3 = "{}".format(direction_vec.z * node_load)
v3 = "{:.13G}".format((direction_vec.z * node_load).Value)

Check warning on line 65 in src/Mod/Fem/femsolver/calculix/write_constraint_force.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Formatting a regular string which could be an f-string (consider-using-f-string)
f.write("{},3,{}\n".format(n, v3))

Check warning on line 66 in src/Mod/Fem/femsolver/calculix/write_constraint_force.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Formatting a regular string which could be an f-string (consider-using-f-string)
f.write("\n")
f.write("\n")
82 changes: 41 additions & 41 deletions src/Mod/Fem/femtest/data/calculix/box_static.inp
Original file line number Diff line number Diff line change
Expand Up @@ -507,47 +507,47 @@ FemConstraintFixed,3
*CLOAD
** FemConstraintForce
** node loads on shape: Box:Face6
2,3,-0.0
4,3,-0.0
6,3,-0.0
8,3,-0.0
18,3,-0.0
19,3,-833.3333333333335
20,3,-833.3333333333335
30,3,-0.0
31,3,-833.3333333333335
32,3,-833.3333333333335
36,3,-0.0
37,3,-833.3333333333335
38,3,-833.3333333333335
42,3,-0.0
43,3,-833.3333333333335
44,3,-833.3333333333335
170,3,-0.0
171,3,-0.0
172,3,-0.0
173,3,-0.0
174,3,-0.0
175,3,-1666.666666666667
176,3,-1666.666666666667
177,3,-1666.666666666667
178,3,-1666.666666666667
179,3,-1666.666666666667
180,3,-1666.666666666667
181,3,-1666.666666666667
182,3,-1666.666666666667
183,3,-1666.666666666667
184,3,-1666.666666666667
185,3,-1666.666666666667
186,3,-1666.666666666667
187,3,-1666.666666666667
188,3,-1666.666666666667
189,3,-1666.666666666667
190,3,-1666.666666666667
191,3,-1666.666666666667
192,3,-1666.666666666667
193,3,-1666.666666666667
194,3,-1666.666666666667
2,3,-0
4,3,-0
6,3,-0
8,3,-0
18,3,-0
19,3,-833.3333333333
20,3,-833.3333333333
30,3,-0
31,3,-833.3333333333
32,3,-833.3333333333
36,3,-0
37,3,-833.3333333333
38,3,-833.3333333333
42,3,-0
43,3,-833.3333333333
44,3,-833.3333333333
170,3,-0
171,3,-0
172,3,-0
173,3,-0
174,3,-0
175,3,-1666.666666667
176,3,-1666.666666667
177,3,-1666.666666667
178,3,-1666.666666667
179,3,-1666.666666667
180,3,-1666.666666667
181,3,-1666.666666667
182,3,-1666.666666667
183,3,-1666.666666667
184,3,-1666.666666667
185,3,-1666.666666667
186,3,-1666.666666667
187,3,-1666.666666667
188,3,-1666.666666667
189,3,-1666.666666667
190,3,-1666.666666667
191,3,-1666.666666667
192,3,-1666.666666667
193,3,-1666.666666667
194,3,-1666.666666667



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node load on shape: CantileverLine:Vertex2
2,3,-9000000.0
2,3,-9000000



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node load on shape: CantileverLine:Vertex2
2,3,-9000000.0
2,3,-9000000



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node load on shape: CantileverLine:Vertex2
2,3,-9000000.0
2,3,-9000000



Expand Down
42 changes: 21 additions & 21 deletions src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_hexa20.inp
Original file line number Diff line number Diff line change
Expand Up @@ -403,27 +403,27 @@ ConstraintFixed,3
*CLOAD
** ConstraintForce
** node loads on shape: Box:Face2
5,3,187500.00000000003
6,3,187500.00000000003
7,3,187500.00000000003
8,3,187500.00000000003
21,3,-750000.0000000001
22,3,375000.00000000006
23,3,-750000.0000000001
24,3,-750000.0000000001
25,3,375000.00000000006
26,3,-750000.0000000001
27,3,-750000.0000000001
28,3,375000.00000000006
29,3,-750000.0000000001
30,3,-750000.0000000001
31,3,375000.00000000006
32,3,-750000.0000000001
98,3,-1500000.0000000002
99,3,-1500000.0000000002
100,3,750000.0000000001
101,3,-1500000.0000000002
102,3,-1500000.0000000002
5,3,187500
6,3,187500
7,3,187500
8,3,187500
21,3,-750000
22,3,375000
23,3,-750000
24,3,-750000
25,3,375000
26,3,-750000
27,3,-750000
28,3,375000
29,3,-750000
30,3,-750000
31,3,375000
32,3,-750000
98,3,-1500000
99,3,-1500000
100,3,750000
101,3,-1500000
102,3,-1500000



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node loads on shape: CanileverPlate:Edge3
3,3,-2250000.0
4,3,-2250000.0
13,3,-4500000.0
3,3,-2250000
4,3,-2250000
13,3,-4500000



Expand Down
10 changes: 5 additions & 5 deletions src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_quad8.inp
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node loads on shape: CanileverPlate:Edge3
3,3,-750000.0
4,3,-750000.0
11,3,-1500000.0
12,3,-3000000.0
13,3,-3000000.0
3,3,-750000
4,3,-750000
11,3,-1500000
12,3,-3000000
13,3,-3000000



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node load on shape: CantileverLine:Vertex2
2,3,-9000000.0
2,3,-9000000



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node load on shape: CantileverLine:Vertex2
2,3,-9000000.0
2,3,-9000000



Expand Down
16 changes: 8 additions & 8 deletions src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria3.inp
Original file line number Diff line number Diff line change
Expand Up @@ -1583,14 +1583,14 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node loads on shape: CanileverPlate:Edge3
3,3,-642857.1428571417
4,3,-642857.1428571455
64,3,-1285714.2857142843
65,3,-1285714.285714283
66,3,-1285714.28571428
67,3,-1285714.2857142847
68,3,-1285714.28571429
69,3,-1285714.2857142906
3,3,-642857.1428571
4,3,-642857.1428571
64,3,-1285714.285714
65,3,-1285714.285714
66,3,-1285714.285714
67,3,-1285714.285714
68,3,-1285714.285714
69,3,-1285714.285714



Expand Down
10 changes: 5 additions & 5 deletions src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria6.inp
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,11 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node loads on shape: CanileverPlate:Edge3
3,3,-750000.0
4,3,-750000.0
39,3,-1500000.0
40,3,-3000000.0
41,3,-3000000.0
3,3,-750000
4,3,-750000
39,3,-1500000
40,3,-3000000
41,3,-3000000



Expand Down
26 changes: 13 additions & 13 deletions src/Mod/Fem/femtest/data/calculix/ccx_cantilever_faceload.inp
Original file line number Diff line number Diff line change
Expand Up @@ -377,19 +377,19 @@ ConstraintFixed,3
*CLOAD
** ConstraintForce
** node loads on shape: Box:Face2
1,3,-0.0
2,3,-0.0
3,3,-0.0
4,3,-0.0
49,3,-0.0
64,3,-750000.0000000001
88,3,-750000.0000000001
100,3,-750000.0000000001
102,3,-750000.0000000001
188,3,-1500000.0000000002
189,3,-1500000.0000000002
190,3,-1500000.0000000002
191,3,-1500000.0000000002
1,3,-0
2,3,-0
3,3,-0
4,3,-0
49,3,-0
64,3,-750000
88,3,-750000
100,3,-750000
102,3,-750000
188,3,-1500000
189,3,-1500000
190,3,-1500000
191,3,-1500000



Expand Down
8 changes: 4 additions & 4 deletions src/Mod/Fem/femtest/data/calculix/ccx_cantilever_nodeload.inp
Original file line number Diff line number Diff line change
Expand Up @@ -377,16 +377,16 @@ ConstraintFixed,3
*CLOAD
** ConstraintForce
** node load on shape: Box:Vertex5
4,3,-2250000.0
4,3,-2250000

** node load on shape: Box:Vertex6
3,3,-2250000.0
3,3,-2250000

** node load on shape: Box:Vertex7
2,3,-2250000.0
2,3,-2250000

** node load on shape: Box:Vertex8
1,3,-2250000.0
1,3,-2250000



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38394,7 +38394,7 @@ ConstraintFixed,6
*CLOAD
** ConstraintForce
** node load on shape: Load_place_point:Vertex1
5,2,-5000.0
5,2,-5000



Expand Down
6 changes: 3 additions & 3 deletions src/Mod/Fem/femtest/data/calculix/constraint_tie.inp
Original file line number Diff line number Diff line change
Expand Up @@ -18630,9 +18630,9 @@ ConstraintFixed,3
*CLOAD
** ConstraintForce
** node loads on shape: BooleanFragments:Edge2
2,2,1666.6666666666667
8,2,1666.6666666666667
385,2,6666.666666666667
2,2,1666.666666667
8,2,1666.666666667
385,2,6666.666666667



Expand Down
Loading

0 comments on commit 5264d6c

Please sign in to comment.