Helmholtz test, sod shock tube

This commit is contained in:
max
2026-05-03 20:33:30 +02:00
parent 7dfc8fa2d2
commit ff4c4aef23
6 changed files with 503 additions and 133 deletions

View File

@@ -21,7 +21,7 @@ namespace FluidSim.Core
{
dt = 1.0 / sampleRate;
double length = 0.5;
double length = 2;
double radius = 50 * Units.mm;
double area = Units.AreaFromDiameter(radius);
@@ -31,8 +31,9 @@ namespace FluidSim.Core
solver = new Solver();
solver.SetTimeStep(dt);
solver.AddPipe(pipe);
solver.SetPipeBoundary(pipe, isLeft: true, BoundaryType.OpenEnd, ambientPressure);
solver.SetPipeBoundary(pipe, isLeft: false, BoundaryType.ClosedEnd);
// Open end at port A (left), closed end at port B (right)
solver.SetPipeBoundary(pipe, isA: true, BoundaryType.OpenEnd, ambientPressure);
solver.SetPipeBoundary(pipe, isA: false, BoundaryType.ClosedEnd);
// Initial pressure pulse
int pulseCells = 5;