jijzepttools.blackbox_optimization.demo.hydraulic_system#
Classes#
A class to hold physical constants relevant to hydraulic systems. |
|
A class to represent the operating conditions of a hydraulic system. |
|
Generic enumeration. |
|
Generic enumeration. |
|
Generic enumeration. |
|
Generic enumeration. |
|
Generic enumeration. |
|
A class to represent hydraulic system design parameters. |
|
A class to represent a hydraulic system with various parameters. |
|
A class to hold material and component properties. |
|
A class to perform thermal calculations for hydraulic systems. |
|
A class to evaluate various performance metrics of hydraulic systems. |
|
Generate realistic noise based on physical phenomena in hydraulic systems. |
|
Black-box optimization class for hydraulic systems with realistic noise. |
Module Contents#
- class PhysicalConstants#
A class to hold physical constants relevant to hydraulic systems.
- STEFAN_BOLTZMANN: float = 5.670374419e-08#
- GRAVITY: float = 9.81#
- AIR_DENSITY: float = 1.225#
- AIR_SPECIFIC_HEAT: float = 1005.0#
- class OperatingConditions#
A class to represent the operating conditions of a hydraulic system.
- ambient_temp: float = 20.0#
- load_factor: float = 0.8#
- operating_hours: float = 8.0#
- class CoolerType#
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- AIR = 'air'#
- WATER = 'water'#
- HYBRID = 'hybrid'#
- class PumpType#
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- FIXED = 'fixed'#
- VARIABLE = 'variable'#
- class OilGrade#
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- VG32 = 'VG32'#
- VG46 = 'VG46'#
- VG68 = 'VG68'#
- class HeatExchangerType#
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- PLATE = 'plate'#
- SHELL_TUBE = 'shell_tube'#
- FINNED = 'finned'#
- class CoolerSize#
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- COMPACT = 'compact'#
- STANDARD = 'standard'#
- LARGE = 'large'#
- class HydraulicSystemParams#
A class to represent hydraulic system design parameters.
- pump_displacement: int = 100#
- pump_speed: int = 1500#
- cooler_type: CoolerType#
- cooler_size: CoolerSize#
- fan_speed: int = 1500#
- heat_exchanger_type: HeatExchangerType#
- oil_volume: int = 100#
- reservoir_capacity: int = 150#
- filter_rating: int = 25#
- pressure_setting: int = 250#
- class HydraulicSystem#
A class to represent a hydraulic system with various parameters.
- params: HydraulicSystemParams#
- operating_conditions: OperatingConditions#
- class MaterialProperties#
A class to hold material and component properties.
- OIL_PROPERTIES#
- PUMP_CHARACTERISTICS#
- COOLER_CHARACTERISTICS#
- COOLER_SIZE_FACTORS#
- class ThermalCalculator#
A class to perform thermal calculations for hydraulic systems.
- static calculate_viscosity_at_temperature(oil_grade: OilGrade, temperature: float) float #
Calculate kinematic viscosity at given temperature using Vogel equation.
- Parameters:
oil_grade – Oil grade specification
temperature – Temperature in Celsius
- Returns:
Kinematic viscosity in mm²/s
- static calculate_heat_generation(system: HydraulicSystem) float #
Calculate total heat generation in the hydraulic system.
- Parameters:
system – HydraulicSystem object
- Returns:
Heat generation in Watts
- static calculate_cooling_capacity(system: HydraulicSystem) float #
Calculate cooling capacity of the system.
- Parameters:
system – HydraulicSystem object
- Returns:
Cooling capacity in Watts
- static predict_oil_temperature(system: HydraulicSystem) float #
Predict steady-state oil temperature.
- Parameters:
system – HydraulicSystem object
- Returns:
Predicted oil temperature in Celsius
- class PerformanceEvaluator#
A class to evaluate various performance metrics of hydraulic systems.
- static evaluate_cooling_efficiency(system: HydraulicSystem) float #
Evaluate cooling efficiency (0-1, higher is better).
- Parameters:
system – HydraulicSystem object
- Returns:
Cooling efficiency score
- static evaluate_energy_efficiency(system: HydraulicSystem) float #
Evaluate energy efficiency (0-1, higher is better).
- Parameters:
system – HydraulicSystem object
- Returns:
Energy efficiency score
- static evaluate_cost_effectiveness(system: HydraulicSystem) float #
Evaluate cost effectiveness (0-1, higher is better).
- Parameters:
system – HydraulicSystem object
- Returns:
Cost effectiveness score
- static evaluate_reliability(system: HydraulicSystem) float #
Evaluate system reliability (0-1, higher is better).
- Parameters:
system – HydraulicSystem object
- Returns:
Reliability score
- class RealisticNoiseGenerator#
Generate realistic noise based on physical phenomena in hydraulic systems.
- static temperature_measurement_noise(base_temp: float, sensor_accuracy: float = 0.5) float #
Generate temperature measurement noise.
- Parameters:
base_temp – Base temperature in Celsius
sensor_accuracy – Sensor accuracy in Celsius (±)
- Returns:
Temperature noise
- static pressure_fluctuation_noise(base_pressure: float, system_params: HydraulicSystemParams) float #
Generate pressure fluctuation noise.
- Parameters:
base_pressure – Base pressure value
system_params – System parameters
- Returns:
Pressure fluctuation noise factor (multiplicative)
- static flow_rate_noise(base_flow: float, oil_grade: OilGrade, temperature: float) float #
Generate flow rate variation noise.
- Parameters:
base_flow – Base flow rate
oil_grade – Oil grade affecting viscosity
temperature – Oil temperature
- Returns:
Flow rate noise factor (multiplicative)
- static thermal_lag_noise(current_temp: float, target_temp: float, system_params: HydraulicSystemParams) float #
Generate thermal lag and hysteresis noise.
- Parameters:
current_temp – Current temperature
target_temp – Target/steady-state temperature
system_params – System parameters
- Returns:
Thermal lag noise
- static aging_degradation_noise(operating_hours: float, system_params: HydraulicSystemParams) float #
Generate aging and degradation effects.
- Parameters:
operating_hours – Total operating hours
system_params – System parameters
- Returns:
Degradation factor (0-1, multiplicative)
- static environmental_noise(ambient_temp: float, season_factor: float = 0.0) dict[str, float] #
Generate environmental condition variations.
- Parameters:
ambient_temp – Base ambient temperature
season_factor – Seasonal variation factor (-1 to 1)
- Returns:
Dictionary of environmental noise factors
- class HydraulicSystemRunner(operating_conditions: OperatingConditions | None = None, weights: dict[str, float] | None = None, noise_level: float = 1.0, enable_aging: bool = True)#
Black-box optimization class for hydraulic systems with realistic noise.
- operating_conditions#
- weights#
- noise_level = 1.0#
- enable_aging = True#
- total_operating_hours = 0.0#
- evaluate_performance(system: HydraulicSystem) float #
Evaluate overall system performance (black-box function) with realistic noise.
- Parameters:
system – HydraulicSystem object to evaluate
- Returns:
Overall performance score (0-1, higher is better)
- analyze_system(system: HydraulicSystem, include_noise_analysis: bool = True) dict[str, Any] #
Perform detailed analysis of a hydraulic system.
- Parameters:
system – HydraulicSystem object to analyze
include_noise_analysis – Whether to include noise component analysis
- Returns:
Dictionary containing detailed analysis results
- simulate_long_term_operation(system: HydraulicSystem, simulation_hours: float = 8760, measurement_interval: float = 24) pandas.DataFrame #
Simulate long-term operation with realistic noise patterns.
- Parameters:
system – HydraulicSystem to simulate
simulation_hours – Total simulation time in hours
measurement_interval – Time between measurements in hours
- Returns:
DataFrame with time-series performance data
- compare_noise_levels(system: HydraulicSystem, noise_levels: list[float] = [0.0, 0.5, 1.0, 2.0]) dict[str, list[float]] #
Compare system performance under different noise levels.
- Parameters:
system – HydraulicSystem to evaluate
noise_levels – List of noise level multipliers to test
- Returns:
Dictionary with performance metrics for each noise level
- generate_random_system() HydraulicSystem #
Generate a random hydraulic system configuration.
- Returns:
Random HydraulicSystem object