How To: Boundary Conditions

Boundary Conditions

  • Restraints

    • Fixed Boundary

      A “Fixed Boundary” restraint fixes the selected geometry in all directions.

      The fixed boundary only has one input:

      • the boundary surface to be fixed

      fixed = FixedVectorDescriptor()
      
      # Set the geometry "restraint.ply" to be fixed
      fixed.boundary = MeshModel("restraint.ply")
      
    • Fixed Vector

      A “Fixed Vector” restraint allows for each direction to be optionally set to a specified displacement value, 0 being fixed and ‘None’ being un-restrained. Note that a structural problem must have all three directions restrained somewhere to be valid.

      A fixed vector has five inputs:

      • the boundary surface to be fixed

      fixed_vector = FixedVectorDescriptor()
      
      # Set the geometry "restraint.stl" to be restrained
      fixed_vector.boundary = MeshModel("restraint.stl")
      
      # Set the displacements in each direction
      fixed_vector.x_value = 0.2  # X-direction displacement of 0.2 ft
      fixed_vector.y_value = None # un-restrained in the Y-direction at this surface
      fixed_vector.z_value = 0.0  # fixed Z-direction
      fixed_vector.units = UnitSystem.FootPoundSecond
      
    • Sliding Restraint

      A “Sliding Restraint” allows for motion tangential to a specified surface, but fixes motion normal to the specified surface.

      A sliding restraint only has one input:

      • the boundary surface for the sliding restraint condition

      sliding_boundary = SlidingBoundaryDescriptor()
      
      # Set the geometry "restraint.stl" for the sliding restraint condition
      sliding_boundary.boundary = MeshModel("restraint.stl")
      
  • Structural Loads (TractionDescriptor)

    • Vector Force

      “Vector Force” load is a surface load applied to a face in a specified direction. An example of this load is pressing on the top of a book to push it across a table.

      A vector load requires four inputs:

      • the boundary surfaces where the load is applied

      load = VectorForceDescriptor()
      
      # Set the geometry "load.stl" the vector load is applied to
      load.boundary = MeshModel("load.stl")
      
      # Set the vector load direction to be in the -Z direction with a magnitude of 100 lbf
      load.direction = [0, 0, -1]
      load.units = UnitSystem.InchPoundSecond
      load.magnitude = 100 # lbf
      
    • Torque

      “Torque” load is a surface load that applies a twisting force around an axis. The direction of the torque is determined using the right-hand rule: using your right hand, point your thumb in the direction of the axis. A positive torque value applies a torque acting in the direction the fingers of your right hand would wrap around the axis. The torque load is applied among the load faces with a distribution that varies linearly from zero at the axis.

      A Torque load requires five inputs:

      • the boundary surfaces where the load is applied

      torque_load = TorqueForceDescriptor()
      
      # Set the geometry "load.stl" the torque load is applied to
      torque_load.boundary = MeshModel("load.stl")
      
      # Set the axis of the torque axis
      torque_load.origin = (10, 1, 1)
      torque_load.axis = [1, 0, 0] # Set the torque to be about the +X (right-hand rule)
      torque_load.units = UnitSystem.MeterKilogramSecond
      torque_load.magnitude = 10 # Set the torque magnitude to 10 N*m
      
    • Pressure

      A “Pressure” load is a surface load specified in terms of force per unit area. Positive pressures ‘push’ into the surface, and negative pressures ‘pull’.

      A Pressure Load requires three inputs:

      • the boundary surfaces where the load is applied

      pressure_load = PressureForceDescriptor()
      
      # Set the geometry "load.stl" the pressure load is applied to
      pressure_load.boundary = MeshModel("load.stl")
      
      # Set the pressure magnitude to 10 Pa
      pressure_load.units = UnitSystem.MeterKilogramSecond
      pressure_load.magnitude = 10
      
    • Bearing Force

      A “Bearing Force” is a surface load applied to a (typically) cylindrical face to approximate the effects of a shaft pressing against the side of a hole. The applied force gets converted to a varying pressure distribution on the portion of the face experiencing compressive pressure. The pressure distribution is computed automatically to achieve the specified overall bearing force.

      A Bearing Force requires four inputs:

      • the boundary surfaces where the load is applied

      bearing_load = BearingForceDescriptor()
      
      # Set the geometry "load.stl" the bearing load is applied to
      bearing_load.boundary = MeshModel("load.stl")
      
      # Set the loading direction to be in the -Z
      bearing_load.direction = [0, 0, -1]
      
      # Set the magnitude of the load to 100 N
      bearing_load.units = UnitSystem.MeterKilogramSecond
      bearing_load.magnitude = 100
      
    • Hydrostatic Load

      A “Hydrostatic” load is a spatially varying pressure on the surfaces submerged in a fluid due to the weight of that fluid. The pressure at any point depends on the height and density of the fluid, increasing from zero at the fluid surface to a maximum at the deepest point.

      A Hydrostatic load requires four inputs:

      • the boundary surfaces where the load is applied

      • the height of the fluid surface

      • the density of the fluid

      • the units that apply to the fluid height and density

      # Create a hydrostatic load on a face of the box
      hydrostatic_load = HydrostaticForceDescriptor()
      
      # Set the geometry "load.stl" the hydrostatic load is applied to
      hydrostatic_load.boundary = MeshModel("load.stl")
      
      # Set the fluid height to 78.0 cm with a fluid density of 1.00 g/cm^3
      hydrostatic_load.units = UnitSystem.CentimeterGramSecond
      hydrostatic_load.height = 78
      hydrostatic_load.density = 1.0
      
    • Flexible Remote Load

      A “Flexible Remote Load” allows specifying the force and moment at a remote location that is then applied to a surface. It can be used in a similar manner to NASTRAN’s RBE3 load or Abaqus coupling elements.

      A Flexible Remote Load requires seven inputs:

      • the boundary surfaces where the load is applied

      • the direction vector of the remote force

      • the force of the remote force

      • the axis of rotation about which the moment acts

      • the moment magnitude of the remote moment

      • the remote_point where the force and moment are applied

      • the units that apply to the magnitude and moment

      The direction and axis vectors should be unit vectors to describe the direction. They will be normalized if they are not unit vectors.

      load = FlexibleRemoteLoadDescriptor()
      
      # Set the geometry "load.stl" the load is applied to
      load.boundary = MeshModel("load.stl")
      
      # Set the loading direction to be in the -Y
      load.direction = [0, -1, 0]
      
      # Set the magnitude of the load to 100 N
      load.units = UnitSystem.MeterKilogramSecond
      load.magnitude = 100
      
      # Set the moment axis in the X direction
      load.axis = [1, 0, 0]
      
      # Set the magnitude of the moment to 200 N-m
      load.moment = 200
      
      # The remote load acts at the point (1, 1, 1)
      load.remote_point = [1, 1, 1]
      
  • Thermal Loads

    • Fixed Boundary (Fixed Temperature)

      A “Fixed Boundary” load fixes the selected geometry to a specified temperature when the value is specified and non-zero.

      The fixed boundary has three inputs:

      • the boundary surface to be fixed

      fixed = FixedBoundaryDescriptor()
      
      # Set the geometry "fixed_temp.ply" to set a fixed temperaure of 320 K
      fixed_boundary.boundary = MeshModel("fixed_temp.ply")
      fixed_boundary.value = 320  # Kelvin
      
      # Set the geometry "fixed_temp.ply" to set a fixed temperaure of 500 Rankine
      fixed_boundary.boundary = MeshModel("fixed_temp.ply")
      fixed_boundary.units = UnitSystem.InchPoundSecond
      fixed_boundary.value = 500  # Rankine
      
    • Convection

      A “Convection” load specifies the transfer of heat from a surrounding medium.

      A thermal convection boundary condition requires three inputs:

      • the boundary surface(s) where the convection is applied.

      # Create an instance of ConvectionDescriptor
      convection = ConvectionDescriptor()
      convection.units = UnitSystem.MeterKilogramSecond
      
      # Set the geometry "face.ply" the convection is applied to
      convection.boundary = MeshModel("face.ply")
      
      # Set the heat transfer coefficient to 25 W/m^2K and environment temperature
      convection.coefficient = 25  # W/m^2K
      convection.environment_temperature = 300  # Kelvin
      
    • Surface Flux

      Surface “Thermal or Heat Flux” specifies the heat flow per unit of surface area.

      A surface thermal flux requires two inputs:

      • the boundary surface(s) where the flux is applied.

      # Create an instance of ConstantFluxDescriptor
      flux = ConstantFluxDescriptor()
      flux.units = UnitSystem.MeterKilogramSecond
      
      # Set the geometry "face.ply" the constant flux is applied to
      flux.boundary = MeshModel("face.ply")
      
      # Set the flux magnitude to 500 W/m^2
      flux.magnitude = 500  # W/m^2
      
  • Body Loads/Internal Conditions

    Body loads comprise forces that are distributed over a solid volume.

    • Linear Acceleration Load or Gravity

      A linear acceleration load can be used to simulate the effect of gravity. The material in the body will tend to be pulled in the direction of the acceleration vector. A linear accleration body load is configured by specifying the direction of the acceleration and its magnitude.

      The inputs to the body load are:

      • the direction vector of the acceleration field

      • the units that apply to the magnitude

      • the magnitude of acceleration

      # Example for a "gravity load"
      body_load = BodyLoadDescriptor()
      
      # Set the direction vector to be downward (-Z)
      body_load.direction = [0, 0, -1]
      
      # Set the magnitude to 9.80655 m/s^2
      body_load.units = UnitSystem.MeterKilogramSecond
      body_load.magnitude = 9.80665
      
    • Rotational Load

      Rotational body loads simulate the effect of a body rotating around an axis. Two contributions are considered in a rotational body load: angular velocity and angular acceleration. The angular velocity term simulates the centrifugal effects that tend to throw a body’s material away from the axis of rotation. The angular acceleration term simulates the effect of a rotational acceleration field around the axis of rotation. A positive angular acceleration tends to drag the body’s material in the positive rotational direction according to the right-hand rule.

      A rotational body load has 4 inputs:

      • origin point for the axis of rotation

      • vector defining the axis of rotation

      • angular_velocity (in radians/sec)

      • angular_acceleration (in radians/sec²)

      rotational_load = RotationalLoadDescriptor()
      
      # Set the origin at the coordinate system origin
      rotational_load.origin = (0, 0, 0)
      
      # Set the axis of rotation about the y-axis
      rotational_load.axis = [0, 1, 0]
      
      # Set angular velocity to 10 rad/s and angular acceleration to 0.5 rad/s^2
      rotational_load.angular_velocity = 10
      rotational_load.angular_acceleration = 0.5
      
  • Thermal Loads

    • Constant Heat

      A “Constant Heat” or body heat flux load applies uniform heat generation over a specified volume.

      Constant heat flux has 2 inputs

      • the instance_id of the components which are producing heat flux

      • the magnitude of the body heat flux

      • the units (default MKS)

      constant_heat = ConstantHeatDescriptor()
      constant_heat.units = UnitSystem.MeterKilogramSecond
      
      # Set the heat generation to -200,000 W/m^3 for a beam component
      constant_heat.instance_id = "beam"
      constant_heat.magnitude = -200000.0  # W/m^3