slippy.contact.StaticStep¶
- class slippy.contact.StaticStep(step_name: str, time_period: float = 1.0, off_set_x: float = 0.0, off_set_y: float = 0.0, normal_load: Optional[float] = None, interference: Optional[float] = None, mean_gap: Optional[float] = None, relative_loading: bool = False, adhesion: bool = True, unloading: bool = False, profile_interpolation_mode: str = 'nearest', periodic_geometry: bool = False, periodic_axes: tuple = (False, False), method: str = 'auto', max_it: int = 1000, tolerance=1e-08, max_it_outer: int = 100, tolerance_outer=1e-08)[source]¶
Static loading between two bodies
- Parameters
step_name (str) – An identifying name for the step used for errors and outputs
time_period (float, optional (1.0)) – The total time period of this model step, used for solving sub-models and writing outputs
off_set_x (float) – The off set between the surfaces origins, in the same units as the grid spacings of the surfaces.
off_set_y (float) – The off set between the surfaces origins, in the same units as the grid spacings of the surfaces.
normal_load (float) – The total compressive load and the interference between the two surfaces (measured from the point of first contact). Exactly one of these must be set. See notes for valid methods for each parameter.
interference (float) – The total compressive load and the interference between the two surfaces (measured from the point of first contact). Exactly one of these must be set. See notes for valid methods for each parameter.
mean_gap (float) – The total compressive load and the interference between the two surfaces (measured from the point of first contact). Exactly one of these must be set. See notes for valid methods for each parameter.
relative_loading (bool, optional (False)) – If True the load or displacement will be applied relative to the value at the start of the step, otherwise the absolute value will be used. eg, if the previous step ended with a load of 10N and this step ramps from 0 to 10N setting relative_loading to True will ramp the total load form 10 to 20N over this step.
adhesion (bool, optional (True)) – If True the adhesion model set for the contact model will be used, If set to false this step will ignore the adhesion model (typically used for loading steps)
unloading (bool, optional (False)) – If True the contact nodes will be constrained to be a sub set of those found in the previous time step.
profile_interpolation_mode ({'nearest', 'linear'}, optional ('nearest')) – Used to generate the grid points for the second surface at the location of the grid points for the first surface, nearest ensures compatibility with sub models which change the profile, if the grid spacings of the surfaces match
periodic_geometry (bool, optional (False)) – If True the surface profile will warp when applying the off set between the surfaces
periodic_axes (tuple, optional ((False, False))) – For each True value the corresponding axis will be solved by circular convolution, meaning the result is periodic in that direction
method ({'auto', 'pk', 'double', 'rey'}, optional ('auto')) – The method by which the normal contact is solved, only used for load controlled contact. ‘pk’ uses the Polonsky and Keer algorithm linear contact. ‘double’ uses a double iteration procedure, suitable for elastic contact with a maximum pressure. ‘rey’ uses the Rey algorithm for adhesive contact. ‘auto’ automatically selects ‘pk’ if there is no maximum pressure and ‘double’ if there is.
max_it (int, optional (1000)) – The maximum number of iterations used in the main loop
tolerance (float, optional (1e-8)) – The relative tolerance used for convergnece of the main loop
max_it_outer (int, optional (100)) – Only used for the double iteration method
tolerance_outer (float, optional (1e-4)) – The norm of the residual used to declare convergence of the bccg iterations
Notes
Not all methods can be used for all set parameters and periodic combinations: rey: Both axes must be periodic, mean_gap or normal_load can be set, adhesion allowed, linear materials pk: Any combination of periodic axes, normal load or interference set (interference requires spartially
defined influence matrix), no adhesion, linear materials
- double: Any combination of periodic axes, normal load or interference set (interference requires spartially
defined influence matrix), no adhesion, maximum load allowed for materials.
Setting the method to ‘auto’ will choose a method automatically or raise an error if no method can be used. If multiple methods can be used the pk solver is used.
Examples
In this example we will recreate the hertz solution using a numerical solver.
>>> import slippy.surface as s >>> import slippy.contact as c >>> # make surface geometry >>> flat_surface = s.FlatSurface(shift=(0,0)) >>> round_surface = s.RoundSurface((1,1,1), extent = (0.006, 0.006), >>> shape = (255, 255), generate = True) >>> # make and set materials >>> steel = c.Elastic('Steel', {'E': 200e9, 'v':0.3}) >>> aluminum = c.Elastic('Aluminum', {'E': 70e9, 'v':0.33}) >>> flat_surface.material = aluminum >>> round_surface.material = steel >>> # make contact model >>> my_model = c.ContactModel('model-1', round_surface, flat_surface) >>> # make and add step >>> total_load = 100 >>> my_step = c.StaticStep('contact', normal_load=total_load, rtol_interference=1e-2) >>> my_model.add_step(my_step) >>> # solve the model >>> result = my_model.solve()
- __init__(step_name: str, time_period: float = 1.0, off_set_x: float = 0.0, off_set_y: float = 0.0, normal_load: Optional[float] = None, interference: Optional[float] = None, mean_gap: Optional[float] = None, relative_loading: bool = False, adhesion: bool = True, unloading: bool = False, profile_interpolation_mode: str = 'nearest', periodic_geometry: bool = False, periodic_axes: tuple = (False, False), method: str = 'auto', max_it: int = 1000, tolerance=1e-08, max_it_outer: int = 100, tolerance_outer=1e-08)[source]¶
Methods
__init__(step_name[, time_period, ...])add_output(output)add_sub_model(sub_model)Add a sub model to be exec :param sub_model: :return:
check_outputs(current_state)Data check all outputs
check_sub_models(current_state)Check all the sub models of the current step
data_check(current_state)To be overwritten by steps that need more complicated checking
save_outputs(current_state, output_file)Writes all outputs for the step into the output file
solve(previous_state, output_file)Solve this model step
solve_sub_models(current_state)Attributes
modelnameThe name of the step