I am currently working on a model using the MoSDH library in Modelica, specific in Dymola2023.
You can find the MoSDH Library on GitHub, here: https://github.com/MoSDH/MoSDH
I am currently experiencing an issue using the threeWayValves as they don't really seem to be able to have an impact on the volumeFlow.
I tried the threeWayValve as well as the threeWayValveMix in the "ExampleValve", which can be found under Components->Distribution, but the different control modes don't seem to have the influence i would expect.
Has anyone experience with using them and may explain to me how to use them?
I am really looking forward to any kind of input by now.
I am trying to use them as switches. Basically: if Scenario A open A and B and close C, elseif Scenario B open A and C and close B. But so far the valves never really restrict the volume flow at any point.
if controlMode==Mode.closeA then
flowPort_a.p=p+volFlowA/V_leakage*dp0;
flowPort_b.p=p+volFlowB/V_flowNom*dpNom;
flowPort_c.p=p+volFlowC/V_flowNom*dpNom;
elseif controlMode==Mode.closeB then
flowPort_a.p=p+volFlowA/V_leakage*dpNom;
flowPort_b.p=p+volFlowB/V_flowNom*dp0;
flowPort_c.p=p+volFlowC/V_flowNom*dpNom;
elseif controlMode==Mode.closeC then
flowPort_a.p=p+volFlowA/V_leakage*dpNom;
flowPort_b.p=p+volFlowB/V_flowNom*dpNom;
flowPort_c.p=p+volFlowC/V_flowNom*dp0;
else
flowPort_a.p=p+volFlowA/V_leakage*dpNom;
flowPort_b.p=p+volFlowB/V_flowNom*dpNom;
flowPort_c.p=p+volFlowC/V_flowNom*dpNom;
end if;
I have looked at the
threeWayValve.moon GitHub, and it is actually a macro-component based on three regular control valvesModelica.Thermal.FluidHeatFlow.Components.Valve. The equation section deals with the openings:My understanding is that with the first mode, your opening command is applied to
valveA, whilevalveBgets the rest: That would be a three-way mixing valve (two inputs & one output) with flows throughportAandportBnominally inwards.The second mode is for the three-way diverting valve (one input & two outputs) with flows through
portBandportCnominally outwards.I am not sure that the third mode means anything, except that each valve is fully open.
As for your need for switches, would something like this work ?