Rail (3d)¶
rollover.three_d.rail.basic¶
Create a basic 3d rail based on an abaqus sketch saved as a .sat file
-
rollover.three_d.rail.basic.create_from_param(rail_param)[source]¶ Call
rollover.three_d.rail.basic.create()with arguments that are present in the rail_param dictionary.- Parameters
rail_param (dict) –
dictionary containing input arguments to create function, required:
’rail_profile’
’rail_length’
- Returns
The model database returned from create
- Return type
Model object (Abaqus)
-
rollover.three_d.rail.basic.create(rail_profile, rail_length, refine_region=None, sym_dir=None, material={'material_model': 'elastic', 'mpar': {'E': 210000.0, 'nu': 0.3}})[source]¶ Create a new model containing a simple rail geometry.
The model is named ‘RAIL’ and the profile is created by importing the sketch rail_profile and extruding it by rail_length. Two sets, one in each end of the rail are created.
- Parameters
rail_profile (str) – Path to an Abaqus sketch profile saved as .sat file (acis)
rail_length (float) – Length of rail to be extruded
refine_region (list(list(float)), optional) – Rectangle specifying partition with mesh refinement in contact region, defaults to None implying no refined region
sym_dir (list(float) (len=3)) – Vector specifying the normal direction if symmetry is used in the rail profile
material (dict) – Dictionary specifying the rail material model, containing the fields ‘material_model’ and ‘mpar’. See
setup_material_modfor detailed requirements
- Returns
The model database containing the rail part
- Return type
Model (Abaqus object)
-
rollover.three_d.rail.basic.create_sets(rail_part, rail_length, refine_region=None, sym_dir=None)[source]¶ Create (1) a set on each side of the rail with names from names.rail_side_sets, (2) the contact surface and set on the top of the rail with name names.rail_contact_surf and (3) a set on the bottom of the rail. If sym_dir is given, create a set with all faces in the yz-plane.
- Parameters
rail_part (Part (Abaqus object)) – The part in which the sets will be created
rail_length (float) – Length of the extruded rail
refine_region (list(list(float)), optional) – Rectangle specifying partition with mesh refinement in contact region, defaults to None implying no refined region
sym_dir (list(float) (len=3)) – Vector specifying the normal direction if symmetry is used in the rail profile
- Returns
None
- Return type
None
-
rollover.three_d.rail.basic.get_bottom_faces(rail_part)[source]¶ Return a list of faces that are on the bottom of the rail profile. These are identified by having their pointOn with an y-coordinate equal to the minimum of all faces and a normal direction [0, -1, 0]
- Parameters
rail_part (Part object (Abaqus)) – The part in which the sets will be created
- Returns
A list of faces that are located in the bottom of the rail
- Return type
list[ Face object (Abaqus) ]
-
rollover.three_d.rail.basic.create_contact_face_set(rail_part, contact_cell, exclude_dir=None)[source]¶ Create a face set and a surface for the contact region.
- Parameters
rail_part (Part object (Abaqus)) – The rail part
contact_cell (Cell object (Abaqus)) – The cell in the rail part that has the contact faces.
exclude_dir (list, np.array) – Normalized vector. If not none, and a face normal aligns with this direction, the face is excluded.
- Returns
None
-
rollover.three_d.rail.basic.get_end_faces(rail_part, zpos)[source]¶ Get the all faces at the end of the rail specified by zpos
- Parameters
rail_part (Part (Abaqus object)) – The part in which the sets will be created
zpos (float) – The position of the end_faces
- Returns
A FaceArray object containing all faces at zpos with z-normal direction
- Return type
FaceArray (Abaqus object)
-
rollover.three_d.rail.basic.create_partition(rail_model, rail_part, refine_region)[source]¶ Create a partition by extruding the rectangle specified by refine_region
- Parameters
rail_model (Model (Abaqus object)) – The model to which the sketch will be added
rail_part (Part (Abaqus object)) – The part in which the sets will be created
refine_region (list(list(float))) – Rectangle specifying partition with mesh refinement in contact region
- Returns
None
- Return type
None
-
rollover.three_d.rail.basic.get_partition_face(rail_part, refine_region)[source]¶ Given the two points specifying the refine region rectangle, find the face that is within this region by checking each corner of the rectangle.
- Parameters
rail_part (Part object (Abaqus)) – The rail part
refine_region (list[ list ]) – List of two points: [[x1,y1],[x2,y2]] specifying the rectangle used to partition the rail’s end face (at z=0)
- Returns
The face and the point used to find it
- Return type
tuple(Face object (Abaqus), np.array)
-
rollover.three_d.rail.basic.add_material_and_section(rail_model, rail_part, material)[source]¶ Create the material specified and create one section for the entire rail.
- Parameters
rail_model (Model object (Abaqus)) – The rail model
rail_part (Part object (Abaqus)) – The rail part
material (dict) – The material specification dictionary, see material_spec in
add_material()
rollover.three_d.rail.mesher¶
This module meshes a rail profile
-
rollover.three_d.rail.mesher.create_basic_from_param(rail_part, rail_param)[source]¶ Call
create_basic()with the settings from rail_param- Parameters
rail_part (Part (Abaqus object)) – The part in which the sets will be created
rail_param (dict) –
dictionary containing input arguments to the create_basic function:
’fine_mesh’
’coarse_mesh’
Optionally, it can also contain ‘refine_region’ specifying the region with fine mesh, otherwise a random cell in the part is chosen. This should happen when only one cell exists, and the fine mesh is applied to the entire rail. ‘refine_region’ is a list of two points in the xy-plane, describing the rectangle used to partition the rail.
- Returns
None
- Return type
None
-
rollover.three_d.rail.mesher.create_basic(rail_part, point_in_refine_cell, fine_mesh, coarse_mesh)[source]¶ Mesh the rail with basic settings
The cell containing point_in_refine_cell will get the fine_mesh size. The global mesh seed will be set to coarse mesh.
- Parameters
rail_part (Part (Abaqus object)) – The part in which the sets will be created
point_in_refine_cell (iterable(float)) – x,y,z coordinates of a point within cell that should have fine mesh
fine_mesh (float) – mesh size in the contact region
fine_mesh – global mesh size
- Returns
None
- Return type
None
-
rollover.three_d.rail.mesher.create_mesh(rail_part, mesh_parameters)[source]¶ Mesh the rail with advanced settings given by mesh_parameters
mesh_parameters list of dictionaries with the following keys
‘point’ (list(float)): Point in the cell to be refined
‘size’ (float): Mesh size in given cell
‘mc’ (dictionary): Arguments to Abaqus’ setMeshControls(…) function
‘et’ (dictionary): Specifications of the element type. This dictionary should contain the following fields:
et[‘element_order’]: 1 or 2
et[‘reduced_integration’] True or False
If the first point is None, these settings will be applied as the global settings to all regions
Note that the edge seeds created for one cell will be overwritten by size specifications for neighbouring cells. I.e., the last specified cell will retain all its edge seeds.
- Parameters
rail_part (Part (Abaqus object)) – The part in which the sets will be created
mesh_parameters (list(dict)) – List of dictionaries describing the mesh parameters, see above
- Returns
None
- Return type
None
-
rollover.three_d.rail.mesher.get_elem_types(order, reduced)[source]¶ Get the Abaqus element types depending on the element type specifications
- Parameters
order (int) – Element order (1st or 2nd)
reduced (bool) – Should reduced order integration be applied when possible?
- Returns
A list of element types
- Return type
list(ElemType (Abaqus object))
rollover.three_d.rail.include¶
This module is used to include a previously created rail part in the rollover analysis
-
rollover.three_d.rail.include.from_file(the_model, model_file, shadow_extents, use_rail_rp=False)[source]¶ Include a previously created rail part in the given model. Shadow regions and constraints are added, and an instance of the rail part is
- Parameters
the_model (Model object (Abaqus)) – The full model
model_file (str) – The path to the model database (.cae file) containing a model: names.rail_model that again contains the part names.rail_part.
shadow_extents (list[ float ] (len=2)) – How far to extend the shadow mesh in each direction. See extend_lengths in
rollover.three_d.rail.shadow_regions.create()use_rail_rp (bool) – Should a reference point for the rail be used and included in the constraint equations?
- Returns
Number of nodes, Number of elements
- Return type
list[ int ]
-
rollover.three_d.rail.include.get_rail_z_extent(rail_part)[source]¶ Get the dimension of rail_part along the z-direction.
- Parameters
the_model (Part object (Abaqus)) – The meshed part
- Returns
Dimension of rail_part along the z-direction.
- Return type
float
-
rollover.three_d.rail.include.get_part_from_file(the_model, model_file)[source]¶ Add the rail part from the rail_model_file, along with materials and sections, to the_model.
- Parameters
the_model (Model object (Abaqus)) – The full model
model_file (str) – The path to the model database (.cae file) containing a model: names.rail_model that again contains the part names.rail_part.
- Returns
None
- Return type
None
rollover.three_d.rail.shadow_regions¶
This module creates shadow regions
-
rollover.three_d.rail.shadow_regions.create(the_model, extend_lengths, Emod=1.0, nu=0.3, thickness=1e-09)[source]¶ Create a dummy region by extending the rail at each side. Assign it a membrane section with parameters, thickness 0.01, Emod, and nu.
Note
Requires that the meshed part, the_model.parts[names.rail_part] contains a surface named names.rail_contact_surf
- Parameters
the_model – The model containing the rail part
extend_lengths (list[ float ], len=2) – The (absolute) distance with which the rail will be extended in each end [z=0, z=L]. If any is None, the full contact surface will be extended.
Emod (float) – Dummy stiffness - elastic modulus of shadow membrane
nu (float) – Dummy Poisson’s ratio of shadow membrane
thickness (float) – Thickness of shadow membrane
- Returns
None
- Return type
None
-
rollover.three_d.rail.shadow_regions.create_mesh(rail_part, contact_surface, z_shift, shadow_size=None, set_name=None)[source]¶ Create dummy elements by extending the rail on one side.
- Parameters
rail_part (Part object (Abaqus)) – The part containing the rail geometry with a surface: names.rail_contact_surf
contact_surface (Surface object (Abaqus)) – The surface containing the mesh to be shifted
z_shift (float) – How much the mesh will be shifted in the z-direction (typically +/- rail_length)
shadow_size (float) – How long part of the contact surface will be extended. (Measured from the opposite side. I.e. if we extend in positive z, how far from z=0 will be included. And contrarily, if negative z, how far from z=rail_length will be included). If None, the full length will be included (equivalent to setting it to rail_length, but ensures no miss due to numerical tolerances.
set_name (str) – Name of set containing the created mesh. If None no set is created
- Returns
None
- Return type
None
rollover.three_d.rail.constraints¶
This module adds the linear constraints to enforce symmetry conditions on the rail Constraints between points in the same position in the xy-plane are added by the following equations
\(u_x^{(\mathrm{c})}, u_y^{(\mathrm{c})}, u_z^{(\mathrm{c})}, u_x^{(\mathrm{r})}, u_y^{(\mathrm{r})}, u_z^{(\mathrm{r})}\) are the \(x\), \(y\) and \(z\) displacements of the constrained, \((\mathrm{c})\), and retained, \((\mathrm{r})\), degrees of freedom. \(x, y\) are the \(x\) and \(y\) coordinates of the points, and \(z^{(\mathrm{c})}\) and \(z^{(\mathrm{r})}\) are the \(z\)-coordinates of the constrained and retained points respectively. \(x^{(\mathrm{rp})}, y^{(\mathrm{rp})}, z^{(\mathrm{rp})}\) are the \(x,y,z\) coordinates of the reference point. \(u_x^{(\mathrm{rp})}, u_y^{(\mathrm{rp})}, u_z^{(\mathrm{rp})}\) are the displacements of the reference point and \(\phi_x^{(\mathrm{rp})}, \phi_y^{(\mathrm{rp})}, \phi_z^{(\mathrm{rp})}\) are its rotations around the \(x,y,z\) axes. Finally, \(L_\mathrm{rail}\) is the length of the rail.
The nodes at the bottom of the rail are constrained according to above, but with \(u_x^{(\mathrm{r})} = u_y^{(\mathrm{r})} = u_z^{(\mathrm{r})} = 0\) and \(z^{(\mathrm{r})} = 0\)
In summary, the height of the reference point determines the neutral line for bending. This will be up to the user to set, and then the load can be set accordingly. E.g. putting it at the top of the rail will give zero normal strains in the surface when prescribing the bending. Putting it in the neutral line of the rail profile will give a more natural bending and normal prescribation.
-
rollover.three_d.rail.constraints.create(the_model, rail_length, use_rail_rp, has_substructure=False)[source]¶ Add the rail constraint sets and equations.
Note
the_model must fulfill the following requirements
Contain a part named names.rail_part that
Is a meshed part.
Contains a set names.rail_bottom_nodes
Contains set pairs (equal node coords in xy-plane): names.rail_side_sets[0:2] and (names.rail_shadow_sets[0], names.rail_contact_surf), and (names.rail_shadow_sets[1], names.rail_contact_surf)
Contains an instance of names.rail_part, named names.rail_inst.
- Parameters
the_model (Model object (Abaqus)) – The full model
rail_length (float) – The length of the rail (z-dimension)
use_rail_rp (bool) – Should a reference point for the rail be used and included in the constraint equations?
has_substructure (bool) – Does the model include a rail substructure?
- Returns
None
- Return type
None
-
rollover.three_d.rail.constraints.add_ctrl_point(the_model, y_coord)[source]¶ Add the rail control point that is used to determine rail tension and bending
- Parameters
the_model (Model object (Abaqus)) – The full model
y_coord (float) – The y-coordinate of the control point
- Returns
The coordinates of the reference point
- Return type
list[ float ] (len=3)
-
rollover.three_d.rail.constraints.add(the_model, rail_length, c_set_name, rp_set_name=None, rp_coord=None, r_set_name=None)[source]¶ Add the constraints to the node in the set c_set_name in the part rail. The constraints are added on the model level. This function deducts the correct assembly set name using names.rail_inst in combination with the set names given as input. The c_set_name and r_set_name must refer to sets belonging to the part. rp_set_name should refer to the set in the assembly.
- Parameters
the_model (Model object (Abaqus)) – The full model
rail_length (float) – The length of the rail
c_set_name (str) – The name of the set in rail_part containing the node to be constrained
rp_set_name (str) – The name of the set in rail_part containing the reference point node
rp_coord (list[ float ] (len=3)) – The coordinates of the rail reference point. (For some reason this is not included in the node properties)
r_set_name (str) – The name of the set in rail_part containing the node participating in the constraint equation to be retained (appart from the reference point node)
- Returns
None
- Return type
None
-
rollover.three_d.rail.constraints.create_sets(rail_part, c_set_name, r_set_name=None)[source]¶ Create individual sets for each matching node in the constrained set and retained set. If a node is already constrained this set pair is not created. The retained set can contain nodes that are not in the constrained set, but not the other way around.
- Parameters
rail_part (Part object (Abaqus)) – The rail part
c_set_name (str) – The name of the set in rail_part containing the nodes to be constrained
r_set_name (str) – The name of the set in rail_part containing the nodes participating in the constraint equation to be retained. If None, only sets for constrained nodes are created, but the returned list of retained set names contains None to have the same length
- Returns
A list with two lists containing set names for the constrained and retained nodes
- Return type
list[ list[ str ] ] (outer len=2, inner len=num_sets)