sfsimodels.models package

Submodules

sfsimodels.models.abstract_models module

class sfsimodels.models.abstract_models.CustomObject[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

An object to describe structures.

ancestor_types
base_type = 'custom_object'
id

Object id :return:

name = None
type = 'custom_object'
class sfsimodels.models.abstract_models.PhysicalObject[source]

Bases: object

add_from_same(obj, inputs_from='obj', update_inputs=True)[source]
ancestor_types
attributes
deepcopy()[source]

Make a clone of the object

set(values)[source]

Set the object parameters using a dictionary

skip_list = ()
to_dict(extra=(), **kwargs)[source]
type = 'physical_object'
unique_hash

sfsimodels.models.buildings module

class sfsimodels.models.buildings.Building(n_storeys, verbose=0, **kwargs)[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

An object to define Buildings

Parameters:n_storeys (int) – Number of storeys
ancestor_types
base_type = 'building'
concrete
floor_area
floor_length
floor_width
g
heights
id
interstorey_heights
max_height
n_storeys
name = None
set_storey_masses_by_pressure(stresses)[source]
storey_masses
type = 'building'
class sfsimodels.models.buildings.BuildingFrame(n_storeys, n_bays)[source]

Bases: sfsimodels.models.buildings.FrameBuilding

class sfsimodels.models.buildings.BuildingFrame2D(n_storeys, n_bays)[source]

Bases: sfsimodels.models.buildings.FrameBuilding2D

class sfsimodels.models.buildings.BuildingSDOF(g=9.8)[source]

Bases: sfsimodels.models.buildings.SDOFBuilding

class sfsimodels.models.buildings.BuildingWall(n_storeys)[source]

Bases: sfsimodels.models.buildings.WallBuilding

class sfsimodels.models.buildings.Element(section_class=None)[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

add_inputs_to_section(props, sections=None)[source]
get_section_prop(prop, section_i=0)[source]
s
section_lengths = None
set_section_prop(prop, prop_value, sections=None)[source]
split_into_multiple(lengths)[source]
to_dict(extra=(), **kwargs)[source]
class sfsimodels.models.buildings.Frame(n_storeys, n_bays)[source]

Bases: object

ancestor_types
bay_lengths
beam_depths
beam_section_ids
beam_sections
beam_widths
beams
beams_at_storey(storey)[source]
column_depths
column_section_ids
column_sections
column_widths
columns
n_bays
n_cols
n_storeys
set_beam_prop(prop, values, repeat='up')[source]

Specify the properties of the beams

Parameters:
  • values
  • repeat – if ‘up’ then duplicate up the structure
Returns:

set_column_prop(prop, values, repeat='up')[source]

Specify the properties of the columns

Parameters:
  • values
  • repeat – if ‘up’ then duplicate up the structure
Returns:

to_dict(extra=(), **kwargs)[source]
class sfsimodels.models.buildings.FrameBuilding(n_storeys, n_bays)[source]

Bases: sfsimodels.models.buildings.Frame, sfsimodels.models.buildings.Building

ancestor_types
n_gravity_frames
n_seismic_frames
type = 'frame_building'
class sfsimodels.models.buildings.FrameBuilding2D(n_storeys, n_bays)[source]

Bases: sfsimodels.models.buildings.Frame, sfsimodels.models.buildings.Building

ancestor_types
to_dict(extra=(), compression=True, **kwargs)[source]
type = 'frame_building2D'
class sfsimodels.models.buildings.SDOFBuilding(g=9.8)[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

An object to describe structures.

ancestor_types
base_type = 'building'
h_eff
id
k_eff
mass_eff
mass_ratio
name = None
t_fixed
type = 'sdof'
weight
class sfsimodels.models.buildings.Section[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

base_type = 'section'
depth
id = None
type = 'section'
width
class sfsimodels.models.buildings.SoilStructureSystem[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

bd = <sfsimodels.models.buildings.SDOFBuilding object>
fd = <sfsimodels.models.foundations.Foundation object>
hz = <sfsimodels.models.hazards.SeismicHazard object>
inputs = ['name', 'id', 'name', 'base_type', 'type', 'h_eff', 'mass_eff', 't_fixed', 'mass_ratio', 'id', 'name', 'base_type', 'type', 'width', 'length', 'depth', 'height', 'density', 'mass', 'id', 'name', 'base_type', 'type', 'stype', 'g_mod', 'bulk_mod', 'poissons_ratio', 'phi', 'dilation_angle', 'e_min', 'e_max', 'e_curr', 'relative_density', 'specific_gravity', 'unit_dry_weight', 'unit_sat_weight', 'saturation', 'cohesion', 'plasticity_index', 'permeability', 'z_factor', 'r_factor', 'n_factor', 'magnitude', 'site_class', 'corner_period', 'corner_acc_factor']
name = 'Nameless'
sp = <sfsimodels.models.soils.Soil object>
class sfsimodels.models.buildings.Structure(g=9.8)[source]

Bases: sfsimodels.models.buildings.BuildingSDOF

class sfsimodels.models.buildings.WallBuilding(n_storeys)[source]

Bases: sfsimodels.models.buildings.Building

ancestor_types
n_walls = 1
type = 'wall_building'
wall_depth = 0.0
wall_width = 0.0

sfsimodels.models.foundations module

class sfsimodels.models.foundations.Foundation[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

An object to describe building foundations

ancestor_types
area

Foundation area in plan :return:

base_type = 'foundation'
density

The mass density of the foundation [kg/m3] :return:

depth

Measure of the base of the foundation to the surface of the soil :return:

height

Measure of the base of the foundation to the top :return:

id
length

Length of the foundation (typically in the out-of-plane direction) :return:

mass

The mass of the whole foundation :return:

name = None
type = 'foundation'
weight

The weight of the foundation [N] :return:

width

Length of the foundation (typically in the in-plane direction) :return:

class sfsimodels.models.foundations.FoundationPad[source]

Bases: sfsimodels.models.foundations.PadFoundation

class sfsimodels.models.foundations.FoundationRaft[source]

Bases: sfsimodels.models.foundations.RaftFoundation

class sfsimodels.models.foundations.PadFoundation[source]

Bases: sfsimodels.models.foundations.Foundation

An extension to the Foundation Object to describe Pad foundations

ancestor_types
area

Contact area of the whole foundation in plan :return:

ftype = 'pad'
i_ll

Second moment of inertia around the length axis. :return:

i_ww

Second moment of inertia around the width axis. :return:

n_pads

Total number of pad footings :return:

n_pads_l = 4
n_pads_w = 3
pad_area

Area of a pad :return:

pad_i_ll

Second moment of inertia of a single pad around the length axis. :return:

pad_i_ww

Second moment of inertia of a single pad around the width axis. :return:

pad_length = 1.0
pad_position_l(i)[source]

Determines the position of the ith pad in the length direction. Assumes equally spaced pads.

Parameters:i – ith number of pad in length direction (0-indexed)
Returns:
pad_position_w(i)[source]

Determines the position of the ith pad in the width direction. Assumes equally spaced pads.

Parameters:i – ith number of pad in width direction (0-indexed)
Returns:
pad_width = 1.0
type = 'foundation_pad'
class sfsimodels.models.foundations.RaftFoundation[source]

Bases: sfsimodels.models.foundations.Foundation

An extension to the Foundation Object to describe Raft foundations

ancestor_types
ftype = 'raft'
i_ll

Contact moment-area around the length axis :return:

i_ww

Contact moment-area around the width axis :return:

type = 'foundation_raft'

sfsimodels.models.hazards module

class sfsimodels.models.hazards.SeismicHazard[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

An object to describe seismic hazard.

ancestor_types
corner_acc
corner_acc_factor = 0.0
corner_disp
corner_period = -1.0
inputs = ['z_factor', 'r_factor', 'n_factor', 'magnitude', 'site_class', 'corner_period', 'corner_acc_factor']
magnitude = 0.0
n_factor = 1.0
outputs = ['pga', 'corner_acc', 'corner_disp']
pga
r_factor = 1.0
site_class = None
type = 'seismic_hazard'
z_factor = 0.0
sfsimodels.models.hazards.msf(magnitude)[source]

Magnitude scaling factor

Parameters:magnitude – Earthquake moment magnitude
Returns:float

sfsimodels.models.material module

class sfsimodels.models.material.Concrete(fc=30000000.0, fy=300000000.0, youngs_steel=200000000000.0, piossons_ratio=0.18)[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

An object to describe reinforced concrete

base_type = 'material'
inputs = ['fy', 'youngs_steel']
type = 'concrete'
youngs_concrete

sfsimodels.models.soils module

class sfsimodels.models.soils.CriticalSoil(pw=9800, **kwargs)[source]

Bases: sfsimodels.models.soils.Soil

ancestor_types
e_cr0 = 0.0
e_critical(p)[source]
lamb_crl = 0.0
p_cr0 = 0.0
type = 'critical_soil'
class sfsimodels.models.soils.Soil(pw=9800, **kwargs)[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

An object to simulate an element of soil

ancestor_types

View list of types from inherited objects

base_type = 'soil'
bulk_mod

Bulk modulus of the soil

calc_shear_vel(saturated)[source]
cohesion

Cohesive strength of the soil

dilation_angle

Internal dilation angle of the soil

peak_angle = phi + dilation_angle

e_curr

The current void ratio of the soil

e_max

The maximum void ratio

e_min

The minimum void ratio

g_mod

Shear modulus of the soil

get_shear_vel(saturated)[source]

Calculate the shear wave velocity

Parameters:saturated – bool, if true then use saturated mass
Returns:
get_unit_mass(saturated)[source]
id

Object id

k_0
moisture_content

The moisture of the soil \((unit_moisture_weight) / (unit_dry_weight)\).

name = None
override(item, value)[source]

Can set a parameter to a value that is inconsistent with existing values.

This method sets the inconsistent value and then reapplies all existing values that are still consistent, all non-consistent (conflicting) values are removed from the object and returned as a list

Parameters:
  • item – name of parameter to be set
  • value – value of the parameter to be set
Returns:

list, conflicting values

permeability

The permeability of the soil

phi

Internal friction angle of the soil

phi_r

internal friction angle in radians

plasticity_index

The plasticity index of the soil

poissons_ratio

Poisson’s ratio of the soil

porosity

Soil porosity

pw

Specific weight of water

recompute_all_stiffness_parameters()[source]
recompute_all_weights_and_void()[source]
relative_density

math (e_max - e_curr) / (.e_max - .e_min)

Type:The relative density
reset_all()[source]

Resets all parameters to None

saturation

The current saturation of the soil

specific_gravity

The specific gravity of the soil

stype = 'soil'
type = 'soil'
unit_bouy_weight

The unit moist weight of the soil (accounts for saturation level)

unit_dry_mass

The mass of the soil in dry state

unit_dry_weight

The unit weight of the soil if saturation=0

unit_moist_weight

The unit moist weight of the soil (accounts for saturation level)

unit_sat_mass

The mass of the soil when fully saturated

unit_sat_weight

The weight of the soil if saturation=1

unit_weight

The unit moist weight of the soil (accounts for saturation level) :return: float

class sfsimodels.models.soils.SoilCritical(pw=9800)[source]

Bases: sfsimodels.models.soils.CriticalSoil

class sfsimodels.models.soils.SoilLayer(depth=0.0, height=1000, top_total_stress=0.0, top_pore_pressure=0.0)[source]

Bases: sfsimodels.models.soils.Soil

class sfsimodels.models.soils.SoilProfile[source]

Bases: sfsimodels.models.abstract_models.PhysicalObject

An object to describe a soil profile

add_layer(depth, soil)[source]

Adds a soil to the SoilProfile at a set depth.

Note, the soils are automatically reordered based on depth from surface.

Parameters:
  • depth – depth from surface to top of soil layer
  • soil – Soil object
add_to_dict(models_dict, **kwargs)[source]
ancestor_types
base_type = 'soil_profile'
crust_effective_unit_weight
depths

An ordered list of depths. :return:

equivalent_crust_cohesion

Calculate the equivalent crust cohesion strength according to Karamitros et al. 2013 sett, pg 8 eq. 14

Returns:equivalent cohesion [Pa]
gen_split(incs=None, target=1.0, props=None)[source]
get_hydrostatic_pressure_at_depth(y_c)[source]
get_layer_index_by_depth(depth)[source]
get_parameter_at_depth(depth, parameter)[source]
get_parameters_at_depth(depth, parameters)[source]
get_soil_at_depth(depth)[source]
get_v_eff_stress_at_depth(y_c)[source]

Determine the vertical effective stress at a single depth z_c.

Parameters:y_c – float, depth from surface
get_v_total_stress_at_depth(z)[source]

Determine the vertical total stress at depth z, where z can be a number or an array of numbers.

gwl

Get the ground water level

height
hydrostatic = False
hydrostatic_pressure(y_c)[source]

Determine the vertical effective stress at a single depth y_c.

Parameters:y_c – float, depth from surface
id

Get the id number of the soil profile

inputs = ['id', 'name', 'gwl', 'unit_water_weight', 'layers', 'height']
layer(index)[source]
layer_depth(index)[source]
layer_height(layer_int)[source]

Get the layer height by layer id number.

Parameters:layer_int
Returns:float, height of the soil layer
layers
n_layers

Number of soil layers :return:

name = None
one_vertical_total_stress(z_c)[source]

Determine the vertical total stress at a single depth z_c.

Parameters:z_c – depth from surface
remove_layer(layer_int)[source]
remove_layer_at_depth(depth)[source]
replace_layer(layer_int, soil)[source]
set_soil_ids_to_layers()[source]
shear_vel_at_depth(y_c)[source]

Get the shear wave velocity at a depth.

Parameters:y_c – float, depth from surface
Returns:
split_props(incs=None, target=1.0, props=None)[source]
to_dict(**kwargs)[source]
type = 'soil_profile'
unit_water_weight = 9800.0
unit_weight_water = 9800.0
vert_eff_stress(y_c)[source]

Determine the vertical effective stress at a single depth z_c.

Parameters:y_c – float, depth from surface
vertical_effective_stress(y_c)[source]

Deprecated. Use get_vert_eff_stress

vertical_total_stress(y_c)[source]
class sfsimodels.models.soils.SoilStressDependent(pw=9800)[source]

Bases: sfsimodels.models.soils.StressDependentSoil

class sfsimodels.models.soils.StressDependentSoil(pw=9800, **kwargs)[source]

Bases: sfsimodels.models.soils.Soil

a
ancestor_types
calc_shear_vel_at_v_eff_stress(saturated, v_eff_stress)[source]
g0_mod
g_mod_at_m_eff_stress(m_eff_stress)[source]
g_mod_at_v_eff_stress(v_eff_stress)[source]
get_g_mod_at_m_eff_stress(m_eff_stress)[source]
get_g_mod_at_v_eff_stress(v_eff_stress)[source]
get_shear_vel_at_v_eff_stress(v_eff_stress, saturated)[source]
p_atm
type = 'stress_dependent_soil'
sfsimodels.models.soils.discretize_soil_profile(sp, incs=None, target=1.0)[source]

Splits the soil profile into slices and stores as dictionary

Parameters:
  • sp – SoilProfile
  • incs – array_like, increments of depth to use for each layer
  • target – target depth increment size
Returns:

dict

sfsimodels.models.systems module

class sfsimodels.models.systems.SoilStructureSystem[source]

Bases: object

add_obj_to_system(obj)[source]
base_type = 'system'
bd
building_id
fd
foundation_id
id = None
name = None
soil_profile_id
sp
to_dict(**kwargs)[source]
type = 'sfs'
unique_hash

sfsimodels.models.time module

class sfsimodels.models.time.TimeSeries(values, dt, name='unnamed')[source]

Bases: object

cut(start=0, end=-1, index=False)[source]

The method cuts the time series to reduce its length. :param start: int or float, optional, New start point :param end: int or float, optional, New end point :param index: bool, optional, if False then start and end are considered values in time.

dt

The time step

npts

The number of points in the time series

reassess()[source]

re-computes dynamic properties :return:

time

An array of time of equal length to the time series

values
sfsimodels.models.time.time_indices(npts, dt, start, end, index)[source]

Determine the new start and end indices of the time series.

Parameters:
  • npts – Number of points in original time series
  • dt – Time step of original time series
  • start – int or float, optional, New start point
  • end – int or float, optional, New end point
  • index – bool, optional, if False then start and end are considered values in time.
Returns:

tuple, start index, end index

Module contents