Model.loadcreatewithsystem#
- Model.loadcreatewithsystem(collection, config, type, comp1, comp2, comp3, comp4, comp5, comp6, system, transformflag)#
Creates a load (force, moment, pressure, or constraint) at a node or element defined in a local coordinate system.
- Parameters:
collection (Collection) – The collection containing the entities.
config (int) –
The config of the load to create:
1 - Force
2 - Moment
3 - Constraint
5 - Temperature
6 - Nodal Flux
8 - Velocity
9 - Acceleration
type (int) – Solver dependent types of the referenced load config.
comp1 (double) – The component of the load being applied. For all configs except constraints (
config=3), this component represents the load in x-direction.comp2 (double) – The component of the load being applied. For all configs except constraints (
config=3), this component represents the load in y-direction.comp3 (double) – The component of the load being applied. For all configs except constraints (
config=3), this component represents the load in z-direction.comp4 (double) – The component of the load being applied. Applicable only for constraints (
config=3).comp5 (double) – The component of the load being applied. Applicable only for constraints (
config=3).comp6 (double) –
The component of the load being applied. Applicable only for constraints (
config=3).Note
For constraints, all of the components are active unless they are set equal to -999999.0. All of the other components of the constraints are active in the respective directions.
For pressures, to create a pressure which is normal to the element, set all components to zero.
system (Entity) – The coordinate system to be used.
transformflag (int) –
Indicates which system supplies component values. Valid options are:
0 - If the component values are supplied in the global coordinate system.
1 - If the component values are supplied in the local coordinate system.
Examples#
Apply a force of magnitude 10.0 along the x - axis of local system with ID 4 to nodes with IDs 5 and 25#import hm import hm.entities as ent model = hm.Model() node_collection = hm.Collection(model, ent.Node, [5, 25]) model.loadcreatewithsystem( collection=node_collection, config=1, type=1, comp1=10.0, comp2=0.0, comp3=0.0, comp4=0.0, comp5=0.0, comp6=0.0, system=ent.System(model, 4), transformflag=1, )
Apply a constraint of zero in the global translational x - axis (comp1) , in the translational z - axis (comp3) , in the rotational y - axis (comp5) to nodes with ID 12 , 13 , and 14 , but have the constraint communicated to the solver in the local coordinate system with ID 4#import hm import hm.entities as ent model = hm.Model() node_collection = hm.Collection(model, ent.Node, [12, 13, 14]) model.loadcreatewithsystem( collection=node_collection, config=3, type=1, comp1=0.0, comp2=999999.0, comp3=0.0, comp4=999999.0, comp5=0.0, comp6=999999.0, system=ent.System(model, 4), transformflag=0, )