Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start values for DynamicPressureInlet/Outlet/Nozzle #211

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ThermofluidStream/Boundaries/DynamicPressureInflow.mo
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
within ThermofluidStream.Boundaries;
model DynamicPressureInflow "Extension of (p,T) source to (p,T,velocity)"

extends Interfaces.SISOFlow(final clip_p_out=true);
extends ThermofluidStream.Interfaces.SISOFlow(clip_p_out=true,dp(start=dp_start),p_out(start=p_start),outlet(state(p(start=p_start),T(start=T_start))));

parameter Boolean assumeConstantDensity=true "= true, if incompressibility is assumed (use '= false' for Ma > 0.3)"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
parameter SI.PressureDifference dp_start = 0 "Start value for pressure difference for solving nonlinear equation system"
annotation(Dialog(group="Numerics",enable = not assumeConstantDensity));
parameter SI.Pressure p_start = Medium.p_default "Start value for outlet pressure for solving nonlinear equation system"
annotation(Dialog(group="Numerics",enable= not assumeConstantDensity));
parameter SI.Temperature T_start = Medium.T_default "Start value for outlet temperature for solving nonlinear equation system"
annotation(Dialog(group="Numerics",enable= not assumeConstantDensity));
parameter Boolean velocityFromInput = false "= true, if input connector for outlet velocity is enabled"
annotation(Dialog(group="Nozzle / Diffusor definition"),Evaluate=true, HideResult=true, choices(checkBox=true));
parameter SI.Velocity v_in_par = 0 "Inlet velocity"
Expand Down
8 changes: 7 additions & 1 deletion ThermofluidStream/Boundaries/DynamicPressureOutflow.mo
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
within ThermofluidStream.Boundaries;
model DynamicPressureOutflow "Extension of (p) sink to (p,velocity)"

extends Interfaces.SISOFlow(final clip_p_out=true);
extends ThermofluidStream.Interfaces.SISOFlow(clip_p_out=true,dp(start=dp_start),p_out(start=p_start),outlet(state(p(start=p_start),T(start=T_start))));

parameter Boolean assumeConstantDensity= true "= true, if incompressibility is assumed (use '= false' for Ma > 0.3)"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
parameter SI.PressureDifference dp_start = 0 "Start value for pressure difference for solving nonlinear equation system"
annotation(Dialog(group="Numerics",enable = not assumeConstantDensity));
parameter SI.Pressure p_start = Medium.p_default "Start value for outlet pressure for solving nonlinear equation system"
annotation(Dialog(group="Numerics",enable= not assumeConstantDensity));
parameter SI.Temperature T_start = Medium.T_default "Start value for outlet temperature for solving nonlinear equation system"
annotation(Dialog(group="Numerics",enable= not assumeConstantDensity));
parameter Boolean areaFromInput = false "= true, if input connector for inlet cross section area is enabled"
annotation(Dialog(group="Nozzle / Diffusor definition"),Evaluate=true, HideResult=true, choices(checkBox=true));
parameter SI.Area A_par = 1 "Inlet cross-section area"
Expand Down
8 changes: 7 additions & 1 deletion ThermofluidStream/Processes/Nozzle.mo
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
within ThermofluidStream.Processes;
model Nozzle "Model for dynamic pressure difference"
extends ThermofluidStream.Interfaces.SISOFlow(final L = L_value, final clip_p_out=true);
extends ThermofluidStream.Interfaces.SISOFlow(clip_p_out=true,dp(start=dp_start),p_out(start=p_start),outlet(state(p(start=p_start),T(start=T_start))));

parameter Boolean assumeConstantDensity=true "= true, if incompressibility is assumed (use '= false' for Ma > 0.3)"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
parameter SI.PressureDifference dp_start = 0 "Start value for pressure difference for solving nonlinear equation system"
annotation(Dialog(group="Numerics",enable = not assumeConstantDensity));
parameter SI.Pressure p_start = Medium.p_default "Start value for outlet pressure for solving nonlinear equation system"
annotation(Dialog(group="Numerics",enable= not assumeConstantDensity));
parameter SI.Temperature T_start = Medium.T_default "Start value for outlet temperature for solving nonlinear equation system"
annotation(Dialog(group="Numerics",enable= not assumeConstantDensity));
parameter Boolean area_in_FromInput = false "= true, if input connector for inlet cross section area is enabled"
annotation(Dialog(group="Nozzle / Diffusor definition"),Evaluate=true, HideResult=true, choices(checkBox=true));
parameter SI.Area A_in = 1 "Inlet cross-sectional area"
Expand Down
Loading