LoadCaseContainerSetup¶
Qualified name: api.simulation.load_cases.load_case_container_setup.LoadCaseContainerSetup
- class api.simulation.load_cases.load_case_container_setup.LoadCaseContainerSetup(item)[source]¶
Bases:
ABC
Methods
Creates a load case and returns a corresponding
LoadCaseSetupPipeline
objectGets the names of existing load cases, with the ordering being the same as the order in the underlying list at the moment of calling this method
Returns a
LoadCaseSetupPipeline
object for a load case setup object with the given nameReturns the name of the object
Removes a load case
Sets the name of the load case container
- abstractmethod create_load_case_setup(lc_type) LoadCaseSetupPipeline [source]¶
Creates a load case and returns a corresponding
LoadCaseSetupPipeline
objectExample
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> load_case_container_setup = simulation_setup.create_load_case_container_setup() >>> load_case_setup = load_case_container_setup.create_load_case_setup(lc_type='Mechanical load case')
- Returns:
A
LoadCaseSetupPipeline
object for the created load case- Return type:
- Raises:
NameNotFoundError – Raised if no loadd case type with the given name was found
- abstractmethod get_available_load_case_names() List[str] [source]¶
Gets the names of existing load cases, with the ordering being the same as the order in the underlying list at the moment of calling this method
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> load_case_container_setup = simulation_setup.create_load_case_container_setup() >>> _ = load_case_container_setup.create_load_case_setup(lc_type='Mechanical load case') >>> _ = load_case_container_setup.create_load_case_setup(lc_type='Mechanical load case') >>> _ = load_case_container_setup.create_load_case_setup(lc_type='Mechanical load case') >>> load_case_container_setup.get_available_load_case_names() ['Mechanical load case', 'Mechanical load case 1', 'Mechanical load case 2']
- Returns:
Names of available load cases
- Return type:
list of strings
- abstractmethod get_load_case_setup(lc_type: str | None = None, name: str | None = None)[source]¶
Returns a
LoadCaseSetupPipeline
object for a load case setup object with the given nameDeprecated
the ‘lc_type’ parameter is deprecated and will be removed without replacement in a future MORe release. Please use only the ‘name’ parameter to specify the load case.
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> load_case_container_setup = simulation_setup.create_load_case_container_setup()
>>> load_case_setup = load_case_container_setup.get_load_case_setup(name='Example LC') # This Load Case must already exist
- Parameters:
name (str) – The name of the existing load case for which to return a
LoadCaseSetupPipeline
- Returns:
A
LoadCaseSetupPipeline
object for the found load case- Return type:
- Raises:
NameNotFoundError – Raised if no load case with the given name was found
- abstractmethod get_name() str [source]¶
Returns the name of the object
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> load_case_container_setup = simulation_setup.create_load_case_container_setup() >>> load_case_container_setup.set_name(name='new_name') <more...> >>> load_case_container_setup.get_name() 'new_name'
- Returns:
name – The name of the object
- Return type:
str
- abstractmethod remove_load_case_setup(lc_type: str | None = None, name: str | None = None) LoadCaseContainerSetup [source]¶
Removes a load case
Deprecated
the ‘lc_type’ parameter is deprecated and will be removed without replacement in a future MORe release. Please use only the ‘name’ parameter to specify the load case to remove.
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> load_case_container_setup = simulation_setup.create_load_case_container_setup()
>>> load_case_setup = load_case_container_setup.remove_load_case_setup(name='Example LC') # This Load Case must already exist
- Parameters:
name (str) – The name of the existing load case to remove
- Returns:
self
- Return type:
- Raises:
NameNotFoundError – Raised if no load case with the given name was found
- abstractmethod set_name(name: str, resolve_duplicate_name: bool = False)[source]¶
Sets the name of the load case container
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> load_case_container_setup = simulation_setup.create_load_case_container_setup() >>> load_case_container_setup.set_name(name='new_name') <more...> >>> simulation_setup.create_load_case_container_setup() \ ... .set_name(name='new_name', resolve_duplicate_name=True) \ ... .get_name() 'new_name 1'
- Parameters:
name (str) – The new name for the load case container
resolve_duplicate_name (bool) – Whether to automatically assign a new name when the chosen one is already taken
- Returns:
self
- Return type:
- Raises:
NameNotUniqueError – Raised if the given name is not unique
TypeError – Raised if the given name is not a string