Engine#

class ansys.chemkin.core.engines.engine.Engine(reactor_condition: ansys.chemkin.core.inlet.Stream, label: str)#

Bases: ansys.chemkin.core.batchreactors.batchreactor.BatchReactors

Generic engine cylinder model.

Overview#

get_time

Convert the current crank angle value to simulation time.

get_ca

Convert the current time to crank angle.

set_cylinder_head_area

Set the cylinder head clearance surface area.

set_piston_head_area

Set the piston head top surface area.

set_piston_pin_offset

Set the piston pin off-set distance.

get_clearance_volume

Get the clearance volume.

get_displacement_volume

Get the displacement volume.

list_engine_parameters

List engine parameters for verification.

set_minimum_zone_mass

Set the minimum mass in a zone.

set_zonal_gas_rate_multiplier

Set the value of the gas-phase reaction rate multiplier.

set_wall_heat_transfer

Set cylinder wall heat transfer model and parameters.

set_gas_velocity_correlation

Set the cylinder gas velocity correlation parameters.

set_heat_transfer_keywords

Set the engine wall heat transfer related keywords.

set_engine_keywords

Set engine parameter keywords under the Full-Keywords mode.

set_enginecondition_keywords

Set engine gas condition keywords.

get_engine_heat_release_cas

Get heat release crank angles from the engine solution.

get_engine_solution_size

Get the number of zones and the number of solution points.

process_engine_solution

Post-process solution.

process_average_engine_solution

Post-process the cylinder averaged solution.

starting_ca

Get the simulation starting crank angle.

ending_ca

Get the simulation ending crank angle.

duration_ca

Get the simulation duration in number of crank angles.

bore

Get the engine cylinder bore diameter.

stroke

Get the engine stroke.

connecting_rod_length

Get the connecting rod length.

compression_ratio

Get the engine compression ratio.

rpm

Get the engine speed in RPM.

ca_step_for_saving_solution

Get the number of crank angles between saving the solution data.

ca_step_for_printing_solution

Get the number of crank angles between printing.

convert_ca_to_time

Convert the current crank angle value to simulation time.

convert_time_to_ca

Convert the current time to crank angle.

Import detail#

from ansys.chemkin.core.engines.engine import Engine

Property detail#

property Engine.starting_ca: float#

Get the simulation starting crank angle.

property Engine.ending_ca: float#

Get the simulation ending crank angle.

property Engine.duration_ca: float#

Get the simulation duration in number of crank angles.

property Engine.bore: float#

Get the engine cylinder bore diameter.

property Engine.stroke: float#

Get the engine stroke.

property Engine.connecting_rod_length: float#

Get the connecting rod length.

property Engine.compression_ratio: float#

Get the engine compression ratio.

property Engine.rpm: float#

Get the engine speed in RPM.

property Engine.ca_step_for_saving_solution: float#

Get the number of crank angles between saving the solution data.

property Engine.ca_step_for_printing_solution: float#

Get the number of crank angles between printing.

Attribute detail#

Engine.borediam = 0.0#
Engine.borearea = 0.0#
Engine.enginestroke = 0.0#
Engine.crankradius = 0.0#
Engine.connectrodlength = 0.0#
Engine.pistonoffset = 0.0#
Engine.cylinderheadarea = 0.0#
Engine.pistonheadarea = 0.0#
Engine.headareas = 0.0#
Engine.compressratio = 1.0#
Engine.enginespeed = 1.0#
Engine.degpersec = 0.0#
Engine.radpersec = 0.0#
Engine.ivc_ca = -180.0#
Engine.evo_ca = 180.0#
Engine.runduration_ca = 360.0#
Engine.numbHTmodelparameters = [3, 3, 5]#
Engine.heattransfermodel: int = -1#
Engine.heattransferparameters: list[float] = []#
Engine.cylinderwalltemperature = 298.15#
Engine.gasvelocity: list[float] = []#
Engine.huber_imep: float | None = None#

Method detail#

static Engine.convert_ca_to_time(ca: float, start_ca: float, rpm: float) float#

Convert the current crank angle value to simulation time.

static Engine.convert_time_to_ca(time: float, start_ca: float, rpm: float) float#

Convert the current time to crank angle.

Engine.get_time(ca: float) float#

Convert the current crank angle value to simulation time.

Engine.get_ca(time: float) float#

Convert the current time to crank angle.

Engine.set_cylinder_head_area(area: float)#

Set the cylinder head clearance surface area.

Engine.set_piston_head_area(area: float)#

Set the piston head top surface area.

Engine.set_piston_pin_offset(offset: float)#

Set the piston pin off-set distance.

Engine.get_clearance_volume() float#

Get the clearance volume.

Engine.get_displacement_volume() float#

Get the displacement volume.

Engine.list_engine_parameters()#

List engine parameters for verification.

Engine.set_minimum_zone_mass(minmass: float)#

Set the minimum mass in a zone.

Engine.set_zonal_gas_rate_multiplier(value: float = 1.0, zone_id: int | None = None)#

Set the value of the gas-phase reaction rate multiplier.

Engine.set_wall_heat_transfer(model: str, ht_parameters: list[float], walltemperature: float)#

Set cylinder wall heat transfer model and parameters.

Engine.set_gas_velocity_correlation(gasvelparameters: list[float], imep: float | None = None)#

Set the cylinder gas velocity correlation parameters.

Engine.set_heat_transfer_keywords()#

Set the engine wall heat transfer related keywords.

Engine.set_engine_keywords()#

Set engine parameter keywords under the Full-Keywords mode.

Engine.set_enginecondition_keywords()#

Set engine gas condition keywords.

Engine.get_engine_heat_release_cas() tuple[float, float, float]#

Get heat release crank angles from the engine solution.

Engine.get_engine_solution_size(expected: int) tuple[int, int]#

Get the number of zones and the number of solution points.

Engine.process_engine_solution(zone_id: int | None = None)#

Post-process solution.

Engine.process_average_engine_solution()#

Post-process the cylinder averaged solution.