Dear all.
please let me introduce myself, Iḿ Henk Fikkert from the Netherlands, and I
am working as a Chemical Engineer for Twence, a Waste Processing and Energy
company.

A couple of years ago I ran into ASCEND, but at that time I didn dig in too
deep. Recently I rediscovered ASCEND, especially through the Rankine cycle
models of John. I am wondering I could use it for a (simple) simulation of
one of our steam cycles. Apart from the models John has introduced, I need
a steam-flash, and I programmed a simple one (hard enough for me however)
of which you find the listing at the end of this message,

I'm not sure if this is a right direction to continue. If someone could
have a look at the code, and give me some feedback, I would be very
grateful.

Thanks and regards,
Henk Fikkert

(*
------------------------------------------------------------------------------
   flash

------------------------------------------------------------------------------
*)
(*
    flash does not have inlet.mdot==outlet.mdot, so not a refinement
    of 'steam_equipment'.
*)
MODEL flash;
    NOTES
        'block' SELF {Model of a simple steam flash}
    END NOTES;

    inlet "in:" IS_A steam_node;
    liquid "out:" IS_A steam_node;
    vapour "out:" IS_A steam_node;
    Qdot IS_A energy_rate;

    liquid.T, vapour.T ARE_THE_SAME;
    liquid.p, vapour.p ARE_THE_SAME;

    (* cons. mass *)
    (* total_flow: inlet.mdot = liquid.mdot + vapour.mdot; *)
    vap_flow: vapour.mdot = inlet.mdot * inlet.x;
    liq_flow: liquid.mdot = inlet.mdot * (1-inlet.x);
    (* cons. energy *)
    cons_en: inlet.mdot * inlet.h + Qdot = liquid.mdot * liquid.h +
vapour.mdot * vapour.h;


END flash;

MODEL flash_test REFINES flash;

(*
fix
inlet.mdot,inlet.p (=>liquid.p, vapour.p)
vapour.x, liquid.x
Qdot
*)

METHODS
    METHOD on_load;
        FIX inlet.mdot;
        FIX inlet.T;
        (* FIX inlet.x;*)
         FIX vapour.x;
        (* FIX liquid.x; *)
        FIX Qdot;
        inlet.T := 495 {K};
        inlet.mdot := 1 {kg/s};
        Qdot     := 0.0 {MW}; (* adiabatic *)
        (* inlet.x := 0.8; *)
        vapour.x := 1.0;
        liquid.x := 0.0000001;
        (* initial guess *)
        inlet.h := 1600 {kJ/kg};
        liquid.h := 674 {kJ/kg};
        vapour.h := 2700 {kJ/kg};
    END on_load;

    METHOD self_test;
      ASSERT liquid.x < 1e-4;
    END self_test;
END flash_test;
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Ascend-sim-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ascend-sim-users

Reply via email to