Loads and Constraints

Acoustic

AcousticPressure

class onscale.loads.AcousticPressure(magnitude: float | str | Var | Function | None = None, time_shift: int = 0, scale_factor: float = 1.0, area_scaling: float = 1.0, alias: str | None = None, amplitude: float | str | Var | Function | None = None)

A Pressure load applicable in acoustic modelling

The Pressure is applied in a direction normal to the face the load is being applied.

Valid targets - Surface

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     pressure = on.loads.AcousticPressure(100)
...     pressure >> geom.parts[0].faces[1]
Parameters:
  • magnitude – Magnitude of the pressure.

  • time_shift – Value by which adding or subtracting a quantity of the shift to the time variable in the function

  • scale_factor – Scale factor by which the amplitude values are multiplied

  • area_scaling – Used to account for the z-dimension in 2D plane strain models and symmetry planes in 2D and 3D models.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Absorbing

class onscale.loads.Absorbing(alias: str | None = None)

An Absorbing boundary condition applicable in acoustic modelling.

Absorbs energy at the boundaries for elastic and acoustic materials, linear and non-linear waves and for multiple materials on the same boundary.

Valid targets - Surface

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     absorbing = on.loads.Absorbing()
...     absorbing >> geom.parts[0].faces[1]
Parameters:

alias – Optional alias for this node

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Impedence

class onscale.loads.Impedance(alias: str | None = None)

An Impedance boundary condition applicable in acoustic modelling.

Impedance boundary conditions applies the mass and stiffness values of an infinite load of a given material on the boundaries stated.

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     impedance = on.loads.Impedance()
...     impedance >> geom.parts[0].faces[1]
Parameters:

alias – Optional alias for this node

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Boundary

Periodic

class onscale.loads.Periodic(alias: str | None = None)

A periodic boundary condition applicable to two opposite surfaces

Valid targets - Surface

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.CadFile("I_Beam_1.step")
...     periodic = on.loads.Periodic()
...     periodic >> (geom.parts[0].faces[1],geom.parts[0].faces[2])

Args:

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Electrical

ElectricalCurrent

class onscale.loads.ElectricalCurrent(magnitude: float | str | Var | Function | None = None, vector: Collection[float] | None = None, alias: str | None = None, amplitude: float | str | Var | Function | None = None, coord_system: CoordinateSystem | None = None)

A Flow load applicable in electrics to surface

Valid targets - Surface

Parameters:
  • magnitude – Magnitude of the HeatFlux.

  • vector – Vector in R^3 of Electrical Current direction.

  • alias – Optional alias for this node

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Voltage

class onscale.loads.Voltage(magnitude: float | str | Var | Function | None = None, alias: str | None = None, amplitude: float | str | Var | Function | None = None, area_scaling: float | None = 1.0)

The electric potential on an electrode.

Valid targets - Surface

Parameters:
  • magnitude – The value of the applied voltage.

  • area_scaling – Scale factor for electrode area.

  • alias – Optional alias for this node

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Ground

class onscale.loads.Ground(alias: str | None = None, area_scaling: float | None = 1.0)

Ground is an electrode assigned a reference potential of 0 volts.

Valid targets - Surface

Parameters:
  • area_scaling – Scale factor for electrode area

  • alias – Optional alias for this node

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Fluid

Flow

class onscale.loads.Flow(magnitude: float | str | Var | Function | None = None, vector: Collection[float] | None = None, alias: str | None = None, amplitude: float | str | Var | Function | None = None, coord_system: CoordinateSystem | None = None)

A Flow load applicable in fluid dynamics to surface

Valid targets - Surface

Parameters:
  • magnitude – Magnitude of the velocity of flow.

  • vector – Vector in R^3 of flow direction.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Wall

class onscale.loads.Wall(model: str | None = None, thermal_type: str | None = None, temperature: float | None = None, alias: str | None = None)

A Wall load applicable in fluid dynamics to surface

By default, all solid surfaces in a fluid simulation will be assigned a “wall” boundary condition. The global default wall settings can be set using on.settings.Flow, and this boundary condition can be used to override those defaults on for individual faces.

Valid targets - Surface

Parameters:
  • model – Type of wall model to use, either ‘auto’, ‘wall_function’, or ‘no_slip’. If not specified, will default to global flow settings.

  • thermal_type – How the wall handles heat transfer, either ‘adiabatic’ or ‘isothermal’. If not specified, will default to global flow settings.

  • temperature – The wall temperature for thermal_type=’isothermal’. If not specified, will default to global flow settings.

  • alias – An optional alias for this load.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

FluidPressure

class onscale.loads.FluidPressure(magnitude: float | str | Var | Function | None = None, mode: str = 'gauge', pressure: float | str | Var | Function | None = None, alias: str | None = None)

A Pressure Outlet applicable in fluid dynamics to surface

Valid targets - Surface

Parameters:
  • magnitude – Magnitude of the Pressure at this Outlet (relative to the others)

  • mode

    Mode for magnitude, either ‘gauge’ or ‘absolute’.

    • ’gauge’ - Specify magnitude as difference from on.setting.ReferencePressure

    • ’absolute’ - Specify magnitude

  • model. (on.setting.ReferencePressure to be defined within the) –

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Mechanical

Fixed

class onscale.loads.Fixed(alias: str | None = None)

Fixes a geometric entity on all axes.

Valid targets - Volume, Surface, Edge, Point

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     fixed = on.loads.Fixed()
...     fixed >> geom.parts[0].faces[2]
Parameters:

alias – Optional alias for this node

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Restraint

class onscale.loads.Restraint(x: bool, y: bool, z: bool, rx: bool | None = None, ry: bool | None = None, rz: bool | None = None, coord_system: CoordinateSystem | None = None, alias: str | None = None)

Fixes a geometric entity against axes of a coordinate system.

Valid targets - Volume, Surface, Edge, Point, Interaction

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     restraint = on.loads.Restraint(x=True, y=False, z=True)
...     restraint >> geom.parts[0].faces[2]
Parameters:
  • x – If true, will restrain translation along the X-axis.

  • y – If true, will restrain translation along the Y-axis.

  • z – If true, will restrain translation along the Z-axis.

  • rx – If true, will restrain rotation about the X-axis (if available).

  • rx – If true, will restrain rotation about the Y-axis (if available).

  • rx – If true, will restrain rotation about the Z-axis (if available).

  • coord_system – The coordinate system in which the restraints are enforced. If not specified, will use the global coordinate system.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Symmetry

class onscale.loads.Symmetry(normal_vector: Collection[float] | None = None, coord_system: CoordinateSystem | None = None, alias: str | None = None)

Adds a symmetry boundary condition on a set of faces.

Valid targets - Surface, Interaction

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     symm = on.loads.Symmetry()
...     symm >> geom.parts[0].faces[2]
Parameters:
  • normal_vector – Optionally specify the normal vector for symmetry. Default is the normal of the application surface.

  • coord_system – The coordinate system in which the symmetry vector is defined. If not specified, will use the global coordinate system

  • alias – Optional alias for this load.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Displacement

class onscale.loads.Displacement(x: float | str | Var | Function | None = None, y: float | str | Var | Function | None = None, z: float | str | Var | Function | None = None, remote: bool | None = None, remote_point: Collection[float] | None = None, remote_target_rigid: bool | None = None, coord_system: CoordinateSystem | None = None, alias: str | None = None)

A Displacement boundary condition in solid mechanics

Valid targets - Volume, Surface, Edge, Point, Interaction, Rigid Body, Deformable Body

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     disp = on.loads.Displacement(x=10)
...     disp >> geom.parts[0].faces[6]
Parameters:
  • x – Displacement on the 1st axis of the coordinate system.

  • y – Displacement on the 2nd axis of the coordinate system.

  • z – Displacement on the 3rd axis of the coordinate system.

  • remote – Boolean specifying if this displacement is a remote displacement

  • remote_point – The point of application of the remote displacement. If not specified, will use the solver default (this will be solver dependent). (This arg is only applicable if remote is set to True)

  • remote_target_rigid – Defines whether the target of the remote displacement should be treated as a rigid geometry. If not specified, will use the solver default (this will be solver dependent). (This arg is only applicable if remote is set to True)

  • coord_system – The coordinate system for this load. If not specified, will use global coordinates.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Pressure

class onscale.loads.Pressure(magnitude: float | str | Var | Function | None = None, time_shift: float = 0.0, scale_factor: float = 1.0, area_scaling: float = 1.0, alias: str | None = None, amplitude: float | str | Var | Function | None = None)

A Pressure load applicable in solid mechanics to face

The Pressure is applied in a direction normal to the face the load is being applied.

Valid targets - Surface, Interaction

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     pressure = on.loads.Pressure(100)
...     pressure >> geom.parts[0].faces[1]
Parameters:
  • magnitude – Magnitude of the pressure.

  • time_shift – Value by which adding or subtracting a quantity of the shift to the time variable in the function

  • scale_factor – Scale factor by which the amplitude values are multiplied

  • area_scaling – Used to account for the z-dimension in 2D plane strain models and symmetry planes in 2D and 3D models.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Force

class onscale.loads.Force(magnitude: float | str | Var | Function | None = None, vector: Collection[float] | None = None, amplitude: float | str | Var | Function | None = None, remote: bool | None = None, remote_point: Collection[float] | None = None, remote_target_rigid: bool | None = None, coord_system: CoordinateSystem | None = None, alias: str | None = None)

A force load which is applied to a face.

The direction of the Force being applied is defined in the vector parameter.

Valid targets - Surface, Interaction, Rigid Body, Deformable Body

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     # regular force
...     force = on.loads.Force(10, [0, 0, -1])
...     force >> geom.parts[0].faces[1]
...     # remote force
...     force_remote = on.loads.Force(magnitude=10, vector=[0, 0, -1], remote=True, remote_point=[0,0,0], remote_target_rigid=True)  # noqa
...     force_remote >> geom.parts[0].faces[2]
Parameters:
  • magnitude – Magnitude of the force.

  • vector – Vector in R^3 of force direction.

  • coord_system – The coordinate system in which the force direction vector is defined. If not specified, will use the global coordinate system

  • remote – Boolean specifying if this force is a remote force

  • remote_point – The point of application of the remote force. If not specified, will use the solver default (this will be solver dependent). (This arg is only applicable if remote is set to True)

  • remote_target_rigid – Defines whether the target of the remote force should be treated as a rigid geometry. If not specified, will use the solver default (this will be solver dependent). (This arg is only applicable if remote is set to True)

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

PointForce

class onscale.loads.PointForce(magnitude: float | str | Var | Function | None = None, vector: Collection[float] | None = None, alias: str | None = None, coord_system: CoordinateSystem | None = None, amplitude: float | str | Var | Function | None = None)

A force load which is applied to a point.

Valid targets - Point

Parameters:
  • magnitude – Magnitude of the force.

  • vector – Vector in R^3 of force direction.

  • coord_system – The coordinate system in which the point force is defined. If not specified, will use the global coordinate system

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Traction

class onscale.loads.Traction(magnitude: float | str | Var | Function | None = None, vector: Collection[float] | None = None, alias: str | None = None, amplitude: float | str | Var | Function | None = None, coord_system: CoordinateSystem | None = None)

A Traction load applicable in solid mechanics to surface.

Similar as Force load, but with pressure units instead of force.

Valid targets - Surface, Interaction

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     pressure = on.loads.Traction(100, [1, 1, 0])
...     pressure >> geom.parts[0].faces[1]
Parameters:
  • magnitude – Magnitude of the traction load in force/area units.

  • vector – Vector in R^3 of force direction.

  • coord_system – The coordinate system in which the traction direction vector is defined. If not specified, will use the global coordinate system

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Torque

class onscale.loads.Torque(magnitude: float | str | Var | Function | None = None, vector: Collection[float] | None = None, amplitude: float | str | Var | Function | None = None, remote_point: Collection[float] | None = None, remote_target_rigid: bool | None = None, coord_system: CoordinateSystem | None = None, alias: str | None = None)

A Torque/Moment load which is applied to a body.

The direction of the Torque being applied is defined in the vector parameter.

Valid targets - Rigid Body, Deformable Body

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     torque = on.loads.Torque(10, [0, 0, -1])
...     rb1 = on.Body(body_type="rigid", ref_point=[0, 2.0, 1.1])
...     geom.parts[0] >> rb1
...     torque >> rb1
Parameters:
  • magnitude – Magnitude of the force.

  • vector – Vector in R^3 of force direction.

  • remote_point – The point of application of the remote torque. If not specified, will use the solver default (this will be solver dependent).

  • remote_target_rigid – Defines whether the target of the remote torque should be treated as a rigid geometry. If not specified, will use the solver default (this will be solver dependent). (This arg is only applicable if remote is set to True)

  • coord_system – The coordinate system in which the torque direction vector is defined. If not specified, will use the global coordinate system

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Rotation

class onscale.loads.Rotation(x: float | str | Var | Function | None = None, y: float | str | Var | Function | None = None, z: float | str | Var | Function | None = None, remote_point: Collection[float] | None = None, remote_target_rigid: bool | None = None, coord_system: CoordinateSystem | None = None, units: str | AngleUnit | None = None, alias: str | None = None)

A Rotation boundary condition which is applied to a body

Valid targets - Rigid Body, Deformable Body

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.ParametricCad(["I_Beam_1.step", "I_Beam_2.step"])
...     rot = on.loads.Rotation(x=10)
...     rb1 = on.Body(body_type="rigid", ref_point=[0, 2.0, 1.1])
...     geom.parts[0] >> rb1
...     rot >> rb1
Parameters:
  • x – Rotation on the 1st axis of the coordinate system.

  • y – Rotation on the 2nd axis of the coordinate system.

  • z – Rotation on the 3rd axis of the coordinate system.

  • remote_point – The point of application of the remote rotation. If not specified, will use the solver default (this will be solver dependent).

  • remote_target_rigid – Defines whether the target of the remote rotation should be treated as a rigid geometry. If not specified, will use the solver default (this will be solver dependent). (This arg is only applicable if remote is set to True)

  • coord_system – The coordinate system for this load. If not specified, will use global coordinates.

  • units – Rotation units - degrees or radians

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

BodyForce

class onscale.loads.BodyForce(magnitude: float | str | Var | Function | None = None, vector: Collection[float] | None = None, alias: str | None = None, coord_system: CoordinateSystem | None = None)

A body force load which is applied to a part.

The distributed force being applied to a part is defined in the vector parameter.

e.g. a 10 N/m3 distributed force in a direction along the x-y diagonal, applied to one part

Valid targets - CAD geometry, Volume

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.CadFile('file.step', 'm')
...     load = on.loads.BodyForce(1000, [1, 1, 0])
...     load >> geom.parts[0]
Parameters:
  • magnitude – Magnitude of the body force.

  • vector – Vector in R^3 of force direction.

  • coord_system – The coordinate system in which the body force direction vector is defined. If not specified, will use the global coordinate system

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Acceleration

class onscale.loads.Acceleration(magnitude: float | str | Var | Function | None = None, vector: Collection[float] | None = None, alias: str | None = None, coord_system: CoordinateSystem | None = None)

An acceleration which is applied to a part.

The acceleration being applied to a part is defined in the vector parameter. e.g. a 9.8 m/s2 acceleration in the negative Z direction, applied to one part

Valid targets - CAD geometry, Volume

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.CadFile('file.step', 'm')
...     load = on.loads.Acceleration(9.8, [0, 0, -1])
...     load >> geom.parts[0]
Parameters:
  • magnitude – Magnitude of the acceleration

  • vector – Vector in R^3 of acceleration direction.

  • coord_system – The coordinate system in which the acceleration direction vector is defined. If not specified, will use the global coordinate system

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Thermal

Temperature

class onscale.loads.Temperature(magnitude: float | str | Var | Function | None = None, alias: str | None = None, amplitude: float | str | Var | Function | None = None)

A temperature load applicable to volume or surface

Valid targets - Volume, Surface, Interaction

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.CadFile("I_Beam_1.step")
...     temp = on.loads.Temperature(100)
...     temp >> geom.parts[0].faces[1]
Parameters:

magnitude – Magnitude of temperature.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

HeatFlux

class onscale.loads.HeatFlux(magnitude: float | str | Var | Function | None = None, mode: str = 'heat_flux', alias: str | None = None, amplitude: float | str | Var | Function | None = None)

A thermal flux load applicable in heat transfer to surface

Valid targets - Surface, Interaction

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.CadFile("I_Beam_1.step")
...     flux = on.loads.HeatFlux(1000)
...     flux >> geom.parts[0].faces[0]
Parameters:
  • magnitude – Magnitude of flux.

  • mode – Mode for amplitude, either ‘heat_flux’ or ‘heat_rate’. * ‘heat_flux’ - Specify amplitude as $W/m^2$ * ‘heat_rate’ - Specify amplitude as $W$

  • alias – Optional alias for this load.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

ThermalPower

class onscale.loads.ThermalPower(magnitude: float | str | Var | Function | None = None, mode: str = 'power', alias: str | None = None, amplitude: float | str | Var | Function | None = None)

A thermal power load applicable to volumes

Valid targets - CAD geometry, Volume

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.CadFile("I_Beam_1.step")
...     flux = on.loads.ThermalPower(256)
...     flux >> geom.parts[2]
Parameters:
  • magnitude – Magnitude of power.

  • mode – Mode for amplitude, either ‘power_density’ or ‘power’. * ‘power’ - Specify amplitude as $W$ * ‘power_density’ - Specify amplitude as $W/m^3$

  • alias – Optional alias for this load.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Convection

class onscale.loads.Convection(htc: float | str | Var | Function, reference_temp: float | str | Var | Function | None = None, alias: str | None = None, ambient_temp: float | str | Var | Function | None = None)

A thermal convection load applicable to surfaces

Valid targets - Surface, Interaction

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.CadFile("I_Beam_1.step")
...     temp = on.loads.Convection(100, 37)
...     temp >> geom.parts[0].faces[1]
Parameters:
  • htc – Heat transfer coefficient.

  • reference_temp – Reference temperature for the load. Alternatively, this argument can be omitted and this will take the value of the global ambient temperature defined with onscale.settings.AmbientTemperature.

  • ambient_temp – DEPRECATED, use reference_temp

  • alias – Optional alias for this load.

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Radiation

class onscale.loads.Radiation(emissivity_coefficient: float | str | Var | Function, reference_temp: float | str | Var | Function | None = None, alias: str | None = None, ambient_temp: float | str | Var | Function | None = None)

A thermal Radiation load applicable to surfaces

Valid targets - Surface, Interaction

Examples

>>> import onscale as on
>>>
>>> with on.Simulation("Static Solve") as sim:
...     geom = on.CadFile("I_Beam_1.step")
...     temp = on.loads.Radiation(0.8, 20)
...     temp >> geom.parts[0].faces[1]
Parameters:
  • emissivity_coefficient – Radiation Emissivity coefficient.

  • reference_temp – Reference temperature for the load. Alternatively, this argument can be omitted and this will take the value of the global ambient temperature defined with onscale.settings.AmbientTemperature.

  • ambient_temp – DEPRECATED, use reference_temp

  • alias – Optional alias for this load.

property bounds_types: Dict[str, BoundsType]

For specifying which fields need to be verified :return: a k,v map of fields names to coefficient types

apply(other: Node)

Apply this load to a geometry :param other: A geometry object.

Returns:

Applied load object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.