Pabq.modelers package

Submodules

Pabq.modelers.rhs_t_joint module

class Pabq.modelers.rhs_t_joint.TjointRHS(column=None, beam=None, l_column=None, l_lever=None, a_weld=None, moment_percent=None, size_factor=None, step_props=None, imperfections=None, mdl_id=None, targets=None, s_gauges=None, node20=None, measure_weld=None, **kargs)[source]

Bases: Pabq.common_tools.abq_tools.GeneralModel

__init__(column=None, beam=None, l_column=None, l_lever=None, a_weld=None, moment_percent=None, size_factor=None, step_props=None, imperfections=None, mdl_id=None, targets=None, s_gauges=None, node20=None, measure_weld=None, **kargs)[source]

Initialise a general model.

Some basic properties are given for the model, like the basename and the solver type.

Parameters:
  • add (bool, optional) – Is the current model going to be added to the Abaqus model database (mdb), leaving any preexisting models intact or is is a single model? In the second case, a new mdb is created and the default initial model “Model-1” is renamed accordingly. The second case is the default.
  • solver (str, "implicit" or "explicit", optional) – Set the type of the solver that is going to be used.
  • direct_submit (bool, optional) – Is the model going to me submitted directly after creation (True) or not (False). In the second case, make sure that the .cae and/or the .inp files are written, otherwise the modeller is rendered useless (no output). Default is True
  • write_input (bool, optional) – Should the input file be written to file? Default is True
  • ncups (int or "availabl", optional) – The number of parallel cpus to be used by the solver. It cold either take an integer value or the string “available”, in which case it will look for an environment variable “NCPUS” on the system. The default value is 1.
  • save_cae (bool, optional) – Should the model database be saved in a .cae file? Default is True
  • mdl_id (str, optional) – Set the basename of the model. It is used as model name, as base name for other entities (e.g. the job). Default is “general_model”
beam_weld_separation(theta=None)[source]
calc_axial_disp()[source]
column_weld_separation()[source]
common_edge(point1, point2)[source]
common_path(point1, point2)[source]
create_history(name, step, region, variables)[source]
static cross_cut_shell(prt, coords, norm_vect)[source]
static export_results(job_name)[source]

Fetch history outputs. Works only with results from the static solver

face_lofter(find_point1=None, find_point2=None, find_path=None)[source]
fetch_maxload()[source]
fillet_welder(depth=None, sketchPlane=None, sketchUpEdge=None, origin=None, orientations=(0, 0, 0, 0), name=None)[source]
get_connected_vrtcs(point)[source]
modeler()[source]

Create a model of a T-joint of RHS profiles.

static pl_datum(prt, plane, offset)[source]
rhs_sketcher(h_rhs, b_rhs, t_rhs, r_rhs, name=None, half=False, **kargs)[source]

Make the necessary sketches for creating a half-symmetric 3D RHS part by sweeping.

static weld_arc_point(point1, point2, curvature=1.0, flip=False)[source]
Pabq.modelers.rhs_t_joint.experiment(test_id)[source]
Pabq.modelers.rhs_t_joint.main()[source]

The main function. It either executes the modeler parametrically for a range of values or just executes a single time for specific values. The parametric execution is activated if “parametric” is given as the last argument from the system.

Pabq.modelers.rhs_t_joint.make_run_model(pl_class, beta_percent, moment_percent, l_column=None, c_width=None, f_yield=None, bl_ratio=None, calcs_only=None, ncpus=None, solver=None, direct_submit=None, id_string=None, **kargs)[source]

Pabq.modelers.closed_polygons module

Pabq.modelers.closed_polygons.blackman_percentage(percent)[source]

Return a Blackman windowing value for a given angle. Blackman is applied around a full circle.

Parameters:angle (float) – An angle in radians. Must be between 0 and 2*pi.
Pabq.modelers.closed_polygons.calc_flex_imp(z, column_length, flex_imp, axis_angle)[source]
Pabq.modelers.closed_polygons.calc_local_imp(coords, r_circle, column_length, circum_waves, meridi_waves, fab_class, percentage, theta_0=None, windowing=False)[source]

Calculaculate displacement of a point for an imperfection pattern.

Parameters:
  • coords
  • r_circle
  • column_length
  • circum_waves
  • meridi_waves
  • fab_class
  • percentage
  • theta_0
  • windowing
Returns:

Displacement vector on the xy plane of the cross-section.

Return type:

(float, float)

Pabq.modelers.closed_polygons.class_2_radius(n_sides, thickness, p_classification, f_yield)[source]

Calculate radius of a polygon for given thickness and classification.

Pabq.modelers.closed_polygons.divisors(n)[source]

Divisors of an integer.

Return all the possible divisors for a given integer.

Parameters:n (int) –
Returns:
Return type:int
Pabq.modelers.closed_polygons.en_calcs(n_sides, r_cyl, thickness, lambda_flex, f_y, fab_class, a_b)[source]

EN calculations for a polygon

Pabq.modelers.closed_polygons.isnumber(x)[source]

Checks if the given object is numeric.

Either float or int will return True. In any other case the return is False.

Parameters:x (any) – Object to be checked.
Returns:
Return type:boolean.
Pabq.modelers.closed_polygons.modeler(n_sides, r_circle, thickness, lambda_flex, f_yield, arc_to_thickness=3.0, flex_imp=0, imperfections=None, windowing=True, fab_class=None, radius_to_elsize=None, biased_mesh=None, n_eigen=None, submit=False, IDstring=None)[source]

Polygonal column modeler

The function is responsible for modelling a polygonal column in Abaqus. Eigenvalue and RIKS analyses are performed depending on the given inputs.

Parameters:
  • n_sides (int) – Number of sides of the polygon cross-section.
  • r_circle (float) – Radius of the equivalent circle. As equivalent is defined the circle having equal perimeter to the polygon.
  • thickness (float) – Shell thickness.
  • column_length (float, optional) – Length of the column. Default value is 2 times the perimeter.
  • imperfections ({tuple of floats, tuple of tuples}, optional) –

    The imperfection variable defines the type or combination of types of the applied initial imperfections. It either take 3 forms: i) a combination of explicitly defined imperfection modes. A tuple of tuples of 4 numbers

    should be given, where each sub-tuple is one imperfection mode and the 4 numbers are the number of circumferencial waves (integer), the number of meridional waves (integer) and the scale factor (float) and the rotational offset respectively,
    1. a combination of plate-like and spillover imperfections. A tuple of 2 floats should be
    given, where the 2 floats are the scale factors for the plate-like and the spillover imperfection respectively.
    1. One of the three folowing strings: plate, shell1, shell2, shell3` to designate
    a specific imperfection type.

    By default, a None value is assigned, which triggers an eigenvalue analysis, from which the first eigenmode is used for initial imperfections.

  • windowing (bool) – Apply windowing on circumferencial imperfections.
  • fab_class ({"fcA", "fcB", "fcC"}, optional) – The fabrication class used to scale the imperfections according to EC3-1-6.
  • radius_to_elsize (float, optional) – Mesh density defined as the ratio of the column radius to the element size. Reasonable values are between 10 and 100. Default value is 20.
  • f_yield (float) – Yield stress.
  • n_eigen (int, optional) – The number of requested eigenvalues. The default value is 1.
  • submit (bool, optional) – Flag to either submit the buckling analysis or not. It does not affect the submission of the eigenvalue analysis, i.e if no imperfections are defined (see “imperfections” parameter above), the eigenvalue analysis will be executed, calculating the requested number of eigenvalues (see “n_eigen” parameter above).
  • IDstring (str) – Identification string for the model. Used in various instances as filename and folder name for the execution.
Pabq.modelers.closed_polygons.modeler_classif(n_sides, r_circle, p_classification, lambda_flex, f_yield, arc_to_thickness=3.0, flex_imp=0, imperfections=None, windowing=True, fab_class=None, radius_to_elsize=None, biased_mesh=None, n_eigen=None, submit=False, IDstring=None)[source]

Execution of the modeler function for given classification instead of given thickness. See documentation of “modeler”. The input parameters are identical, except the replacement of “thickness” with “p_classification”.

Pabq.modelers.closed_polygons.modeler_from_pclass_area(n_sides, p_classification, area, lambda_flex, f_yield, fab_class=None, flex_imp=0, imperfections=None, windowing=True, arc_to_thickness=3, radius_to_elsize=None, biased_mesh=None, n_eigen=None, submit=False, IDstring=None)[source]
Pabq.modelers.closed_polygons.results_from_odb(filename=None)[source]

Get results from polygonal odb.

Parameters:
  • odb_file (str) – Relative path/filename of the odb file.
  • requests (dict, optional) – Results requested from odb. Default is all.
  • headers (bool of list of strings, optional) – If given, returns only the headers of the results
Returns:

Return type:

str

Pabq.modelers.bolt module

Pabq.modelers.bolt.export_results(name=None)[source]

Get results from bolt odb.

Parameters:modelname (str) – Model base name (before the “_”). The results will be exported to a pickle file with the name “modelname”_results.pkl
Returns:
Return type:tuple
Pabq.modelers.bolt.main(**kargs)[source]
Pabq.modelers.bolt.modeler(name=None, grip_lengths=None, double_nut=None, add=None, write_input=None, save_cae=None, submit=None)[source]

Create an Abaqus model of a uniaxial bolt test.

Parameters:
  • name (str, optional) – Name of the model. This string is also used as a base name upon which alternative suffixes are appended for several sub objects of the model e.g. the jog is named as `name`_job. By default, a generic name “BoltAndNut” is used
  • grip_lengths (array-like of two floats, optional) – Tow floats are expected in an array (list or tuple) giving the grip length, l_g (first float), and the threaded grip length, l_t (second float). Default implies l_g = 28, l_t = 10
  • double_nut (bool, optional) – Single or double nut assembly. Default implies single nut.
  • add (bool, optional) – Whether or not to add the model in the existing session or create a new session (deletes all other models). The default value is True (the model will be added to the current session, existing models remain untouched)
  • write_input (bool, optional) – Whether or not to write the input file for the created model. Default is False
  • save_cae (bool, optional) – Whether or not to save the model in a .cae file in the working directory. Default is False
  • submit (bool, optional) – Whether or not to submit for analysis. Default is False
Returns:

Return type:

model object

Notes

The modelling script is a continuation of the work of Erik Grimsmo [1]. The initial script was used to model 5 uniaxial bolt tests. The current script is a complete revision allowing for a parametric definition of the bolt assembly grip length, the threaded part of the grip length and the number of nuts (single or double nut assembly). This way, an arbitrary bolt assembly can be modeled on demand for specific applications. Currently, the bolt diameter and the grade are fixed (M16 8.8).

[1] E. L. Grimsmo, A. Aalberg, M. Langseth, and A. H. Clausen, “Failure modes of bolt and nut assemblies under
tensile loading” Journal of Constructional Steel Research, vol. 126, pp. 15-25, Nov. 2016.

Pabq.modelers.connector module

Pabq.modelers.connector.export_results(name=None)[source]

Get results from connector odb.

Parameters:modelname (str) – Model base name (before the “_”). The results will be exported to a pickle file with the name “modelname”_results.pkl
Returns:
Return type:tuple
Pabq.modelers.connector.main(**kargs)[source]
Pabq.modelers.connector.modeler(name=None, add=False, cnctr_dict=None, disp_control=True, smooth_amp=False, submit=True)[source]

Create an Abaqus model with one connector

Pabq.modelers.connector.set_connector(bolt_diam=None, bolt_grade=None, grip_length=None, threaded_grip_length=None)[source]

Creates a dictionary with the description of a connector.

This object can be given as input to the modeler.

Returns:
Return type:dict
Pabq.modelers.connector.set_timehist()[source]

Create a dictionary with the time history description of the displacements

Module contents