flow360.SlidingInterface#

class SlidingInterface[source]#

Bases: Flow360BaseModel

SlidingInterface class for setting up sliding interface

Parameters:
  • center (Coordinate) – axis : Vector stationary_patches : List[str] rotating_patches : List[str] volume_name : Union[str, int, List[str], List[int]] parent_volume_name : Optional[str] = None name : Optional[str] = None theta_radians : Optional[str] = None theta_degrees : Optional[str] = None omega_radians : Optional[float] = None omega_degrees : Optional[float] = None is_dynamic : Optional[bool] = None

  • center – Coordinate representing the origin of rotation, eg. (0, 0, 0)

  • axis (Axis) – Axis of rotation, eg. (0, 0, 1)

  • stationary_patches (List[str]) – A list of static patch names of an interface

  • rotating_patches (List[str]) – A list of dynamic patch names of an interface

  • volume_name (Union[str, int, List[str], List[int]]) – A list of dynamic volume zones related to the above {omega, centerOfRotation, axisOfRotation}

  • name (str, optional) – Name of slidingInterface

  • parent_volume_name (str, optional) – Name of the volume zone that the rotating reference frame is contained in, used to compute the acceleration in the nested rotating reference frame

  • theta_radians (str, optional) – Expression for rotation angle (in radians) as a function of time

  • theta_degrees (str, optional) – Expression for rotation angle (in degrees) as a function of time

  • omega (Union[float, Omega], optional) – Nondimensional rotating speed, radians/nondim-unit-time

  • omega_radians (float | None) – Nondimensional rotating speed, radians/nondim-unit-time

  • omega_degrees (float | None) – Nondimensional rotating speed, degrees/nondim-unit-time

  • is_dynamic (bool | None) – Whether rotation of this interface is dictated by userDefinedDynamics

Returns:

An instance of the component class SlidingInterface.

Return type:

SlidingInterface

Example

>>> si = SlidingInterface(
        center=(0, 0, 0),
        axis=(0, 0, 1),
        stationary_patches=['patch1'],
        rotating_patches=['patch2'],
        volume_name='volume1',
        omega=1
    )

Attributes

Methods

__init__([filename])

Create a new model by parsing and validating input data from keyword arguments.

add_type_field()

Automatically place "type" field with model name in the model field dictionary.

allow_but_remove(values)

root validator for allow_but_remove, e.g., legacy properties that are no longer in use

append(params[, overwrite])

append parametrs to the model

construct([_fields_set])

Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.

copy([update])

Copy a Flow360BaseModel.

dict(*args[, exclude])

Returns dict representation of the model.

dict_from_file(filename)

Loads a dictionary containing the model from a .json or .yaml file.

flow360_schema()

Generate a schema json string for the flow360 model

flow360_ui_schema()

Generate a UI schema json string for the flow360 model

from_file(filename)

Loads a Flow360BaseModel from .json, or .yaml file.

from_json(filename, **parse_obj_kwargs)

Load a Flow360BaseModel from .json file.

from_orm(obj)

from_yaml(filename, **parse_obj_kwargs)

Loads Flow360BaseModel from .yaml file.

generate_docstring()

Generates a docstring for a Flow360 model and saves it to the __doc__ of the class.

handle_conflicting_fields(values)

root validator to handle deprecated aliases

handle_deprecated_aliases(values)

root validator to handle deprecated aliases

help([methods])

Prints message describing the fields and methods of a Flow360BaseModel.

json(*args[, exclude])

Returns json representation of the model.

one_of(values)

root validator for require one of

parse_file(path, *[, content_type, ...])

parse_obj(obj)

parse_raw(b, *[, content_type, encoding, ...])

schema([by_alias, ref_template])

schema_json(*[, by_alias, ref_template])

set_will_export_to_flow360(flag)

Recursivly sets flag will_export_to_flow360

to_file(filename)

Exports Flow360BaseModel instance to .json or .yaml file

to_json(filename)

Exports Flow360BaseModel instance to .json file

to_solver(params[, exclude, required_by])

Loops through all fields, for Flow360BaseModel runs .to_solver() recusrively.

to_yaml(filename)

Exports Flow360BaseModel instance to .yaml file.

update_forward_refs(**localns)

Try to update ForwardRefs on fields based on this Model, globalns and localns.

validate(value)

Inherited Common Usage

center#
axis#
stationary_patches#
rotating_patches#
volume_name#
parent_volume_name#
name#
theta_radians#
theta_degrees#
omega_radians#
omega_degrees#
is_dynamic#