Model.loadcreateonentity#
- Model.loadcreateonentity(collection, config, type, comp1, comp2, comp3, comp4, comp5, comp6)#
Creates a load (forces, temperature, moment, velocity, acceleration, or constraints) on nodes, fixed points (surface vertices or weld points), surface edges, and surfaces.
- Parameters:
collection (Collection) – The collection containing the entities. Valid entities are nodes, points, surface edges(lines) and surfaces.
config (int) –
The configuration of the load to apply. Valid values are:
1 - Force
2 - Moment
3 - Constraint
5 - Temperature
6 - Flux
8 - Velocity
9 - Acceleration
type (int) – The type assigned to the load (as defined on the “load types” panel).
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.
Example#
Apply a temperature of 0.0 degrees on a surface#import hm import hm.entities as ent model = hm.Model() surface_collection = hm.Collection(model, ent.Surface, [12]) model.loadcreateonentity( collection=surface_collection, config=5, type=1, comp1=0.0, comp2=0.0, comp3=0.0, comp4=0.0, comp5=0.0, comp6=0.0, )