OneSimulation docs Website Free books Plans on Gumroad

Docs › Physics API reference › onesim.physics.multiphysics

A.13 onesim.physics.multiphysics

adapt_electro_thermal_result function

adapt_electro_thermal_result(result: object, *, result_id: str = 'multiphysics.electro_thermal.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish electro-thermal fields and coupling diagnostics.

adapt_fluid_structure_result function

adapt_fluid_structure_result(result: object, *, result_id: str = 'multiphysics.fluid_structure.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish fluid/structure fields, interface traction and energies.

adapt_general_coupled_subsystems_result function

adapt_general_coupled_subsystems_result(result: object, *, result_id: str = 'multiphysics.general_coupled_subsystems.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish named subsystem DOFs and block-coupling diagnostics.

adapt_magneto_mechanics_result function

adapt_magneto_mechanics_result(result: object, *, result_id: str = 'multiphysics.magneto_mechanics.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish magnetostriction, Maxwell-pressure and mechanical fields.

adapt_reactive_coupling_result function

adapt_reactive_coupling_result(result: object, *, result_id: str = 'multiphysics.reactive_coupling.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish arbitrary species densities, temperature and balance data.

adapt_thermo_mechanics_result function

adapt_thermo_mechanics_result(result: object, *, result_id: str = 'multiphysics.thermo_mechanics.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish thermoelastic fields and coupled energy/balance diagnostics.

AdiabaticReaction class

AdiabaticReaction(*, domain: object, model_id: str = <factory>, network: ReactionNetworkIR, volumetric_heat_capacity: float, kinetics: object = None, thermal_source: object = 0.0, species_sources: Mapping = <factory>) -> None

Advance lumped species and temperature using a reaction network and volumetric heat capacity.

Selected methods.

concentration(species)
source(species)

DEFAULT_MULTIPHYSICS_PROVIDER_REGISTRY value

Default registry for the domain provider route. Inspect the registered IDs when choosing a provider.

ElectroThermalConfiguration class

ElectroThermalConfiguration(provider: str = 'multiphysics.electro_thermal', mesh: str = 'core.coordinate_projection.1d', discretization: str = 'finite_difference', time_integration: str = 'classical_rk4', solver: str = 'joule_heating_fixed_point', parameters: Mapping[str, object] = <factory>) -> None

Select shared numerical contracts and electro-thermal parameters.

Selected methods.

to_numerical_configuration() -> NumericalConfiguration

Translate this configuration into the shared Core configuration.

ElectroThermalProvider class

ElectroThermalProvider(*, cell_count: int = 64, density: float = 1.0, heat_capacity: float = 1.0, thermal_conductivity: float = 1.0, electrical_conductivity: float = 1.0, conductivity_temperature_coefficient: float = 0.0, maximum_conductivity_exponent: float = 50.0, reference_temperature: float = 0.0, permittivity: float = 1.0, applied_electric_field: FieldSource | None = 1.0, charge_density: np.ndarray | None = None, external_heat_source: FieldSource = 0.0, initial_temperature: np.ndarray | None = None, final_time: float = 0.0, time_step: float = 0.0001, time_integration: str = 'classical_rk4', **_: object) -> None

Integrate conductive heat transfer with temperature-dependent Joule heating.

Selected methods.

result_adapter(result: object, *, result_id: str = 'multiphysics.electro_thermal.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish electro-thermal fields and coupling diagnostics.

execute(problem: object | None = None) -> ElectroThermalResult

Advance coupled temperature and evaluate electrical/Joule fields.

ElectroThermalPublicApi class

ElectroThermalPublicApi(*, provider_registry=None) -> None

Execute electro-thermal cases through the multiphysics registry.

Selected methods.

validate(configuration: ElectroThermalConfiguration) -> tuple[str, ...]

Return public-boundary configuration errors.

run(configuration: ElectroThermalConfiguration)

Validate and execute the selected provider.

ElectroThermalResult class

ElectroThermalResult(coordinates: np.ndarray, state: ElectroThermalState, electric_field: np.ndarray, conductivity: np.ndarray, current_density: np.ndarray, joule_heat: np.ndarray, time: float, step_count: int, thermal_balance_residual: float, coupling_graph_accepted: bool, electric_field_result: ElectricFieldResult | None) -> None

Final temperature, electrical state, Joule source, and balance data.

Selected methods.

to_mapping() -> dict[str, object]

Return serializable copied fields and coupling diagnostics.

ElectroThermalState class

ElectroThermalState(temperature: np.ndarray) -> None

Temperature field used by the coupled electrical and thermal balance.

FluidColumnPiston class

FluidColumnPiston(*, domain: object, model_id: str = <factory>, piston_mass: float, fluid_density: float, column_length: float, area: float, spring_stiffness: float, external_force: float | None = 0.0) -> None

Integrate piston motion with the effective inertia of a fluid column and a spring.

Declared fields. displacement (m, differential), velocity (m/s, differential), interface_pressure (Pa, derived), stored_energy (J, derived), load (N, input).

FluidStructureConfiguration class

FluidStructureConfiguration(provider: str = 'multiphysics.fluid_structure', mesh: str = 'core.coordinate_projection.1d', discretization: str = 'finite_difference', time_integration: str = 'classical_rk4', solver: str = 'monolithic_interface_momentum', parameters: Mapping[str, object] = <factory>) -> None

Select shared numerical contracts and FSI interface parameters.

Selected methods.

to_numerical_configuration() -> NumericalConfiguration

Translate this configuration into the shared Core configuration.

FluidStructureProvider class

FluidStructureProvider(*, cell_count: int = 64, fluid_density: float = 1.0, fluid_viscosity: float = 0.01, structural_density: float = 1.0, elastic_modulus: float = 1.0, structural_damping: float = 0.0, interface_impedance: float = 1.0, interface_pressure: FieldSource = 0.0, fluid_body_force: FieldSource = 0.0, initial_fluid_velocity: np.ndarray | None = None, initial_structural_displacement: np.ndarray | None = None, initial_structural_velocity: np.ndarray | None = None, final_time: float = 0.0, time_step: float = 0.0001, time_integration: str = 'classical_rk4', **_: object) -> None

Integrate a partition-independent linear fluid-structure interface model.

Selected methods.

result_adapter(result: object, *, result_id: str = 'multiphysics.fluid_structure.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish fluid/structure fields, interface traction and energies.

execute(problem: object | None = None) -> FluidStructureResult

Advance fluid/structure fields and return interface diagnostics.

FluidStructurePublicApi class

FluidStructurePublicApi(*, provider_registry=None) -> None

Execute FSI cases through the multiphysics registry.

Selected methods.

validate(configuration: FluidStructureConfiguration) -> tuple[str, ...]

Return public-boundary configuration errors.

run(configuration: FluidStructureConfiguration)

Validate and execute the selected provider.

FluidStructureResult class

FluidStructureResult(coordinates: np.ndarray, state: FluidStructureState, interface_traction: np.ndarray, time: float, step_count: int, fluid_kinetic_energy: float, structural_kinetic_energy: float, structural_strain_energy: float, interface_power: float, interface_residual: float) -> None

Final coupled fields, interface traction, energy, and residual data.

Selected methods.

to_mapping() -> dict[str, object]

Return copied coupled fields and energy/interface diagnostics.

FluidStructureState class

FluidStructureState(fluid_velocity: np.ndarray, structural_displacement: np.ndarray, structural_velocity: np.ndarray) -> None

Fluid velocity, structural displacement, and structural velocity fields.

GeneralCoupledSubsystemsConfiguration class

GeneralCoupledSubsystemsConfiguration(provider: str = 'multiphysics.general_coupled_subsystems', mesh: str = 'core.dof.0d', discretization: str = 'block_state', time_integration: str = 'classical_rk4', solver: str = 'monolithic_or_partitioned_linear_coupling', parameters: Mapping[str, object] = <factory>) -> None

Select coupling execution semantics and subsystem matrix parameters.

Selected methods.

to_numerical_configuration() -> NumericalConfiguration

Translate this configuration into the shared Core configuration.

GeneralCoupledSubsystemsProvider class

GeneralCoupledSubsystemsProvider(*, subsystem_ids: Sequence[str] = ('subsystem_a', 'subsystem_b'), subsystem_sizes: Sequence[int] = (1, 1), system_matrix: Sequence[Sequence[float]] = ((-1.0, 1.0), (1.0, -1.0)), source: Source = (0.0, 0.0), initial_state: Sequence[float] = (1.0, 0.0), coupling_mode: str = 'monolithic', partition_iterations: int = 8, partition_tolerance: float = 1e-10, relaxation: float = 1.0, final_time: float = 0.0, time_step: float = 0.001, time_integration: str = 'classical_rk4', **_: object) -> None

Integrate arbitrary linear coupled subsystems with Core coupling contracts.

Selected methods.

result_adapter(result: object, *, result_id: str = 'multiphysics.general_coupled_subsystems.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish named subsystem DOFs and block-coupling diagnostics.

coupling_graph() -> CouplingGraph

Build and validate Core coupling entities for active cross blocks.

execute(problem: object | None = None) -> GeneralCoupledSubsystemsResult

Advance the configured coupled system in monolithic or partitioned mode.

GeneralCoupledSubsystemsPublicApi class

GeneralCoupledSubsystemsPublicApi(*, provider_registry=None) -> None

Execute generic coupled systems through the multiphysics registry.

Selected methods.

validate(configuration: GeneralCoupledSubsystemsConfiguration) -> tuple[str, ...]

Return public-boundary configuration errors.

run(configuration: GeneralCoupledSubsystemsConfiguration)

Validate and execute the selected provider.

GeneralCoupledSubsystemsResult class

GeneralCoupledSubsystemsResult(state: GeneralCoupledSubsystemsState, derivative: np.ndarray, time: float, step_count: int, coupling_residual: float, partition_iterations: int, graph_accepted: bool, graph_diagnostics: tuple[str, ...]) -> None

Coupled state, graph validation, and partition-iteration diagnostics.

Selected methods.

to_mapping() -> dict[str, object]

Return state, subsystem mapping, and execution diagnostics.

GeneralCoupledSubsystemsState class

GeneralCoupledSubsystemsState(values: np.ndarray, subsystem_ids: tuple[str, ...], subsystem_sizes: tuple[int, ...]) -> None

One concatenated state vector with named subsystem slices.

Selected methods.

subsystem_mapping() -> dict[str, np.ndarray]

Return independent copies keyed by stable subsystem identity.

HeatedResistor class

HeatedResistor(*, domain: object, model_id: str = <factory>, resistance: float, heat_capacity: float, applied_voltage: float | None, thermal_power: float | None = 0.0, temperature_coefficient: float = 0.0, reference_temperature: float = 300.0) -> None

Integrate a temperature-dependent resistor's heating balance under applied voltage and thermal input.

Declared fields. temperature (K, differential), resistance (Ohm, derived), current (A, derived), joule_power (W, derived), thermal_energy (J, derived), supply (V, input), heat_source (W, input).

MagnetoMechanicsConfiguration class

MagnetoMechanicsConfiguration(provider: str = 'multiphysics.magneto_mechanics', mesh: str = 'core.coordinate_projection.1d', discretization: str = 'finite_difference', time_integration: str = 'classical_rk4', solver: str = 'coupled_magnetostriction_momentum', parameters: Mapping[str, object] = <factory>) -> None

Select Core numerical contracts and magneto-mechanical parameters.

Selected methods.

to_numerical_configuration() -> NumericalConfiguration

Translate this public configuration to the shared Core contract.

MagnetoMechanicsProvider class

MagnetoMechanicsProvider(*, cell_count: int = 64, structural_density: float = 1.0, youngs_modulus: float = 1.0, poisson_ratio: float = 0.0, magnetic_permeability: float = 1.0, magnetostriction_coefficient: float = 0.0, magnetic_reference_field: float = 1.0, magnetic_force_coefficient: float = 1.0, structural_damping: float = 0.0, applied_magnetic_field: FieldSource | None = 0.0, current_density: np.ndarray | None = None, initial_displacement: np.ndarray | None = None, initial_velocity: np.ndarray | None = None, final_time: float = 0.0, time_step: float = 0.0001, time_integration: str = 'classical_rk4', **_: object) -> None

Integrate magnetostriction and Maxwell-stress loading of an elastic bar.

Selected methods.

result_adapter(result: object, *, result_id: str = 'multiphysics.magneto_mechanics.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish magnetostriction, Maxwell-pressure and mechanical fields.

execute(problem: object | None = None) -> MagnetoMechanicsResult

Advance displacement and velocity and return the final coupled balance.

MagnetoMechanicsPublicApi class

MagnetoMechanicsPublicApi(*, provider_registry=None) -> None

Validate and execute magneto-mechanical cases through the registry.

Selected methods.

validate(configuration: MagnetoMechanicsConfiguration) -> tuple[str, ...]

Return public-boundary errors without modifying simulation state.

run(configuration: MagnetoMechanicsConfiguration)

Validate and execute the selected registered coupling provider.

MagnetoMechanicsResult class

MagnetoMechanicsResult(coordinates: np.ndarray, state: MagnetoMechanicsState, magnetic_field: np.ndarray, magnetic_strain: np.ndarray, strain: np.ndarray, stress: np.ndarray, magnetic_pressure: np.ndarray, magnetic_force: np.ndarray, time: float, step_count: int, momentum_balance_residual: float, elastic_energy: float, magnetic_energy: float, magnetic_field_result: MagneticFieldResult | None) -> None

Final coupled fields, energies, residual, and optional magnetic solve.

Selected methods.

to_mapping() -> dict[str, object]

Return copied fields and scalar diagnostics suitable for serialization.

MagnetoMechanicsState class

MagnetoMechanicsState(displacement: np.ndarray, velocity: np.ndarray) -> None

Displacement and velocity of the mechanically active one-dimensional body.

MULTIPHYSICS value

Public identity for the multiphysics methodology.

MultiphysicsProviderRegistry class

MultiphysicsProviderRegistry() -> None

Register multiphysics providers by stable identifier.

Selected methods.

register(provider_id: str, factory: Callable[..., object], *, catalog_role: str = 'unclassified') -> None
catalog_role(provider_id: str) -> str
create(provider_id: str, **parameters: object) -> object
ids() -> tuple[str, ...]

NUMERICS_BINDING value

Public binding value for the multiphysics numerical interface.

ReactiveCouplingConfiguration class

ReactiveCouplingConfiguration(provider: str = 'multiphysics.reactive_coupling', mesh: str = 'core.coordinate_projection.1d', discretization: str = 'finite_difference_operator_split', time_integration: str = 'reaction_provider_plus_explicit_transport', solver: str = 'plasma_reaction_network', parameters: Mapping[str, object] = <factory>) -> None

Select shared Core contracts and user-extensible reactive parameters.

Selected methods.

to_numerical_configuration() -> NumericalConfiguration

Translate to the common numerical configuration boundary.

ReactiveCouplingProvider class

ReactiveCouplingProvider(*, species: SpeciesSet, reaction_network: ReactionNetwork, initial_densities: Mapping[str, np.ndarray], initial_temperature: np.ndarray, cell_count: int | None = None, species_diffusivities: Mapping[str, float] | None = None, default_species_diffusivity: float = 0.0, thermal_diffusivity: float = 0.0, temperature_capacity: float = 1.0, reaction_integration: str = 'explicit_euler', strict_conservation: bool = False, positivity_floor: float = 0.0, final_time: float = 0.0, time_step: float = 0.0001, **_: object) -> None

Couple a user-defined plasma reaction network to Core transport operators.

Selected methods.

result_adapter(result: object, *, result_id: str = 'multiphysics.reactive_coupling.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish arbitrary species densities, temperature and balance data.

execute(problem: object | None = None) -> ReactiveCouplingResult

Advance reaction sources and diffusion on one shared Core layout.

ReactiveCouplingPublicApi class

ReactiveCouplingPublicApi(*, provider_registry=None) -> None

Validate and execute reactive coupling through the provider registry.

Selected methods.

validate(configuration: ReactiveCouplingConfiguration) -> tuple[str, ...]

Return public-boundary validation errors.

run(configuration: ReactiveCouplingConfiguration)

Validate and execute the configured reaction–transport case.

ReactiveCouplingResult class

ReactiveCouplingResult(coordinates: np.ndarray, state: ReactiveCouplingState, time: float, step_count: int, reaction_energy_source: float, species_diffusion_residual: float, thermal_balance_residual: float) -> None

Final plasma state, transport diagnostics and coupled energy residual.

Selected methods.

to_mapping() -> dict[str, object]

Return copied extensible species fields and coupling diagnostics.

ReactiveCouplingState class

ReactiveCouplingState(plasma_state: PlasmaState) -> None

Reacting multi-species state represented by the shared PlasmaState.

ThermalExchange class

ThermalExchange(*, domain: object, model_id: str = <factory>, first_capacity: float, second_capacity: float, conductance: float, first_power: float | None = 0.0, second_power: float | None = 0.0) -> None

Integrate two thermal capacities connected by a conductance, with independent power inputs.

Declared fields. first_temperature (K, differential), second_temperature (K, differential), heat_flow (W, derived), stored_energy (J, derived), first_source (W, input), second_source (W, input).

ThermoMechanicsConfiguration class

ThermoMechanicsConfiguration(provider: str = 'multiphysics.thermo_mechanics', mesh: str = 'core.coordinate_projection.1d', discretization: str = 'finite_difference', time_integration: str = 'classical_rk4', solver: str = 'coupled_thermoelastic_momentum', parameters: Mapping[str, object] = <factory>) -> None

Select shared numerical contracts and thermoelastic parameters.

Selected methods.

to_numerical_configuration() -> NumericalConfiguration

Translate this API configuration to the shared Core contract.

ThermoMechanicsProvider class

ThermoMechanicsProvider(*, cell_count: int = 64, density: float = 1.0, heat_capacity: float = 1.0, thermal_conductivity: float = 1.0, youngs_modulus: float = 1.0, poisson_ratio: float = 0.0, thermal_expansion: float = 0.0, reference_temperature: float = 1.0, structural_damping: float = 0.0, damping_heat_fraction: float = 1.0, external_heat_source: FieldSource = 0.0, initial_temperature: np.ndarray | None = None, initial_displacement: np.ndarray | None = None, initial_velocity: np.ndarray | None = None, final_time: float = 0.0, time_step: float = 0.0001, time_integration: str = 'classical_rk4', **_: object) -> None

Integrate thermoelastic deformation and thermal conduction without solver duplication.

Selected methods.

result_adapter(result: object, *, result_id: str = 'multiphysics.thermo_mechanics.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish thermoelastic fields and coupled energy/balance diagnostics.

execute(problem: object | None = None) -> ThermoMechanicsResult

Advance thermal and structural fields on the shared Core grid.

ThermoMechanicsPublicApi class

ThermoMechanicsPublicApi(*, provider_registry=None) -> None

Validate and execute thermo-mechanics through the multiphysics registry.

Selected methods.

validate(configuration: ThermoMechanicsConfiguration) -> tuple[str, ...]

Return public-boundary configuration errors.

run(configuration: ThermoMechanicsConfiguration)

Validate and execute the selected coupling provider.

ThermoMechanicsResult class

ThermoMechanicsResult(coordinates: np.ndarray, state: ThermoMechanicsState, thermal_strain: np.ndarray, strain: np.ndarray, stress: np.ndarray, dissipation_heat: np.ndarray, time: float, step_count: int, thermal_balance_residual: float, momentum_balance_residual: float, elastic_energy: float, thermal_energy: float, coupling_graph_accepted: bool) -> None

Coupled fields, thermoelastic strain/stress and balance diagnostics.

Selected methods.

to_mapping() -> dict[str, object]

Return copied fields and scalar coupled-balance diagnostics.

ThermoMechanicsState class

ThermoMechanicsState(temperature: np.ndarray, displacement: np.ndarray, velocity: np.ndarray) -> None

Temperature, displacement and velocity on the shared one-dimensional mesh.

VoiceCoil class

VoiceCoil(*, domain: object, model_id: str = <factory>, resistance: float, inductance: float, force_factor: float, mass: float, spring_stiffness: float, damping: float, applied_voltage: float | None, external_force: float | None = 0.0) -> None

Integrate the coupled current, displacement and velocity of an electromechanical actuator.

Declared fields. current (A, differential), displacement (m, differential), velocity (m/s, differential), magnetic_force (N, derived), back_emf (V, derived), stored_energy (J, derived), input_power (W, derived), dissipated_power (W, derived), supply (V, input), load (N, input).