I have a question regarding *CLOAD card. I need to manually include forces in C3D10 element nodes correctly.

In writer.py script, one can find the following code, which is the responsible for writing the forces of *CLOAD card.

Code: Select all

```
def write_constraints_force(self, f):
# check shape type of reference shape and get node loads
self.get_constraints_force_nodeloads()
# write node loads to file
f.write('\n***********************************************************\n')
f.write('** Node loads Constraints\n')
f.write('** written by {} function\n'.format(sys._getframe().f_code.co_name))
f.write('*CLOAD\n')
for femobj in self.force_objects: # femobj --> dict, FreeCAD document object is femobj['Object']
f.write('** ' + femobj['Object'].Label + '\n')
direction_vec = femobj['Object'].DirectionVector
for ref_shape in femobj['NodeLoadTable']:
f.write('** ' + ref_shape[0] + '\n')
for n in sorted(ref_shape[1]):
node_load = ref_shape[1][n]
if (direction_vec.x != 0.0):
v1 = "{:.13E}".format(direction_vec.x * node_load) # Help! Need to find node_load values
f.write(str(n) + ',1,' + v1 + '\n')
if (direction_vec.y != 0.0):
v2 = "{:.13E}".format(direction_vec.y * node_load) # Help! Need to find node_load values
f.write(str(n) + ',2,' + v2 + '\n')
if (direction_vec.z != 0.0):
v3 = "{:.13E}".format(direction_vec.z * node_load) # Help! Need to find node_load values
f.write(str(n) + ',3,' + v3 + '\n')
f.write('\n')
f.write('\n')
```

e.g.

Code: Select all

```
22,3,1000.000000000000 # the node 22 has a force of 1000 [N] in z direction.
23,3,500.000000000000 # the node 23 has a force of 500 [N] in z direction.
...
```

In order to include forces correctly in C3D10 element nodes, I need to define correctly the aforementioned 3 components.

1.- The definition of a manually selected nodes is not a handicap, it is discussed here: https://forum.freecadweb.org/viewtopic. ... 10#p258488

2.- The definition of the direction is not a handicap. x=1,y=2,z=3

**3.- My problem is here in the third component: the magnitude of the force for each node.**

The last part has a product of two variables:

*direction_vec.x * node_load*direction_vec is not a handicap.

**The definition of Node_load is my real problem**

In order to include forces correctly in C3D10 element nodes, I need to find in FreeCAD folder the python or C++ scripts where the following four functions are defined:

1.- self.get_constraints_force_nodeloads()

2.- self.force_objects

3.- femobj['NodeLoadTable']

4.- node_load = ref_shape[1][n]

I guess that all of them should be in the same script... but I dont know where are defined.

I arrived until here:

*def FemInputWriter.FemInputWriter.get_constraints_force_nodeloads(self )*but I dont find the python or C++ script.

best regards,

Ekaitz.

More info regarding C3D10 element here: [url]http://web.mit.edu/calculix_v2.7/Calcul ... 3.html[url]