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

Simplify moisture fraction when allowFlowReversal=false #305

Closed
Mathadon opened this issue Aug 15, 2015 · 1 comment
Closed

Simplify moisture fraction when allowFlowReversal=false #305

Mathadon opened this issue Aug 15, 2015 · 1 comment

Comments

@Mathadon
Copy link
Member

Annex60.Fluid.Interfaces.PartialTwoPortTransport can be simplified when allowFlowReversal=false:

  port_a.Xi_outflow =  inStream(port_b.Xi_outflow);
  port_b.Xi_outflow = inStream(port_a.Xi_outflow);
  port_a.C_outflow = inStream(port_b.C_outflow);
  port_b.C_outflow = inStream(port_a.C_outflow);

then becomes

  port_a.Xi_outflow = if allowFlowReversal then inStream(port_b.Xi_outflow) else Medium.X_default[1:Medium.nXi];
  port_b.Xi_outflow = inStream(port_a.Xi_outflow);
  port_a.C_outflow = if allowFlowReversal then inStream(port_b.C_outflow) else zeros(Medium.nC);
  port_b.C_outflow = inStream(port_a.C_outflow);

this is similar to Annex60.Fluid.Interfaces.StaticTwoPortConservationEquation.

I'll make a pull request.

mwetter added a commit that referenced this issue Aug 17, 2015
…portFloRev

for #305 : implemented more efficient code for when allowFlowReversal…
@mwetter
Copy link
Contributor

mwetter commented Aug 17, 2015

This is now on the master.

@mwetter mwetter closed this as completed Aug 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants