Skip to content
Snippets Groups Projects
Commit e5f1348b authored by MARSOLLIER Felix's avatar MARSOLLIER Felix
Browse files

Modification of the model to test the reversal flow

parent f39c419e
No related branches found
No related tags found
No related merge requests found
within TAeZoSysPro_testsuite.PDE;
model test_UpwindFirstOrder
parameter Modelica.SIunits.Velocity Vel = 1;
parameter Modelica.SIunits.Length L = 1 "Length of the domain";
parameter Integer N = 5 "Number of discrete layer";
Modelica.SIunits.Velocity Vel;
TAeZoSysPro.PDE.Transport.UpwindFirstOrder transport(
CoeffTimeDer = 1,
CoeffSpaceDer = Vel,
......@@ -13,16 +14,19 @@ model test_UpwindFirstOrder
x = linspace(0, L, N+1),
SourceTerm = fill(0.0, N)) annotation(
Placement(visible = true, transformation(origin = {0, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
Modelica.Blocks.Sources.Pulse pulse(amplitude = -2, offset = 1, period = 4, startTime = 2) annotation(
Placement(visible = true, transformation(origin = {-60, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
initial equation
transport.u[:, 1] = fill(0.0, N);
transport.u[:, 2] = fill(0.0, N);
equation
//
Vel = pulse.y;
// Boundary conditions
transport.u_ghost_left[:] = fill(1.0, 2);
transport.u_ghost_right[:] = fill(1.0, 2);
transport.u_ghost_right[:] = fill(2.0, 2);
end test_UpwindFirstOrder;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment