Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » alam2021
  • » Profile

Posts

Posts

I was trying with the below script.  No matter what amount of water comes in to the dam, the amount of water leaving remains the same. In reality, the dam should not release water for a certain amount of time, it could be several minutes (assuming the bottom outlet is at height h=0. In addition, in reality, if excess water comes into the dam, after a certain period of time, there must be an overflow. I couldn't figure out on how to handle these two:

- adjust height of bottom outlet (h>=0), thus understand how the outflow varies as a result of this adjustment
- the overflow (excess amount of water that passes such as over a spillway when height of water hmax > height of dam

Can anyone help me to figure out this ?


model Dam
        constant SI.Acceleration g = Modelica.Constants.g_n;
        constant SI.Density rho = 1000;
        parameter SI.Pressure patm = 1e5;
        parameter SI.Length L = 1500;
        parameter SI.Length W = 1000;
        parameter SI.Area A = 1500000;
        parameter SI.Height h = 18;
        SI.Volume V(unit="m3");
        SI.Pressure p2;
        SI.Pressure p1;
        SI.MassFlowRate Qm1(unit="m3/s");
        SI.MassFlowRate Qm2;
        SI.VolumeFlowRate Qv;
        Real S;
        hIn  hc;
        hOut  hc1;
    equation
        patm + p1 = p2;
        p1 = rho*g*h;
        V = A*h;
        hc.Qm/rho = Qv;
        hc.p = patm;
        hc.Qm = Qm1;
        hc1.p = p2;
        hc1.Qm = Qm2;
        hc.Qm+hc1.Qm = der(S)*rho;
    end Dam;

Does anyone know a reservoir script (text script) that includes the following:
.
- inflow from time series data
- regulated outflow and excess outflow (if the reservoir attains its maximum capacity
- the orifice (outflow) is at the bottom of the reservoir.

I would like to do my degree project for hydropowe generation.  All I need is a balanced modelica script (without drawing objects) for the reservoir

Please help how can I start

Thank you in advance

  • Index
  • » Users
  • » alam2021
  • » Profile
You are here: