30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
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 Pressure; // Pa
|
|
public double Density; // kg/m³
|
|
public double Temperature; // K
|
|
|
|
// Link back to owner (optional, but handy for debugging)
|
|
public object? Owner { get; set; }
|
|
|
|
public Port()
|
|
{
|
|
MassFlowRate = 0.0;
|
|
SpecificEnthalpy = 0.0;
|
|
Pressure = 101325.0;
|
|
Density = 1.225;
|
|
Temperature = 300.0;
|
|
}
|
|
}
|
|
} |