Helmholtz testing (no decay bug)
This commit is contained in:
@@ -2,18 +2,9 @@ using System.Collections.Generic;
|
||||
|
||||
namespace FluidSim.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Minimal interface for all simulation components that have ports.
|
||||
/// </summary>
|
||||
public interface IComponent
|
||||
{
|
||||
/// <summary>All ports exposed by this component.</summary>
|
||||
IReadOnlyList<Port> Ports { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Called once per global time step to update the component's internal state
|
||||
/// using the port flow data accumulated during sub‑steps.
|
||||
/// </summary>
|
||||
void UpdateState(double dt);
|
||||
void UpdateState(float dt);
|
||||
}
|
||||
}
|
||||
@@ -2,23 +2,23 @@
|
||||
{
|
||||
public class Port
|
||||
{
|
||||
public double MassFlowRate; // kg/s, positive INTO the component that owns this port
|
||||
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)
|
||||
public float MassFlowRate; // kg/s, positive INTO owning component
|
||||
public float SpecificEnthalpy; // J/kg
|
||||
public float Pressure; // Pa
|
||||
public float Density; // kg/m³
|
||||
public float Temperature; // K
|
||||
public float AirFraction; // mass fraction (0 = exhaust, 1 = air)
|
||||
|
||||
public object? Owner { get; set; }
|
||||
|
||||
public Port()
|
||||
{
|
||||
MassFlowRate = 0.0;
|
||||
SpecificEnthalpy = 0.0;
|
||||
Pressure = 101325.0;
|
||||
Density = 1.225;
|
||||
Temperature = 300.0;
|
||||
AirFraction = 1.0; // default fresh air
|
||||
MassFlowRate = 0f;
|
||||
SpecificEnthalpy = 0f;
|
||||
Pressure = 101325f;
|
||||
Density = 1.225f;
|
||||
Temperature = 300f;
|
||||
AirFraction = 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user