Engine working

This commit is contained in:
max
2026-05-07 21:48:37 +02:00
parent 92d84eacfe
commit b3230844b7
14 changed files with 441 additions and 486 deletions

View File

@@ -1,21 +1,14 @@
namespace FluidSim.Interfaces
{
/// <summary>
/// A fluid port that belongs to a component. The solver writes mass flow,
/// enthalpy, etc. here, and reads pressure, density, etc.
/// </summary>
public class Port
{
// Set by the solver during coupling resolution
public double MassFlowRate; // kg/s, positive INTO the component that owns this port
public double SpecificEnthalpy; // J/kg, enthalpy of the fluid crossing the port (inflow direction)
// Set by the owning component after integration to reflect its current state
public double SpecificEnthalpy; // J/kg
public double Pressure; // Pa
public double Density; // kg/m³
public double Temperature; // K
public double AirFraction; // mass fraction of air (0 = exhaust, 1 = air)
// Link back to owner (optional, but handy for debugging)
public object? Owner { get; set; }
public Port()
@@ -25,6 +18,7 @@
Pressure = 101325.0;
Density = 1.225;
Temperature = 300.0;
AirFraction = 1.0; // default fresh air
}
}
}