################################################################################ # FICHE DE MODELE SABER : ED:1 REV:0 # AUTEUR:OCSIMIZE DATE:02/11/04 # # FICHIER hydro2pneu.sin : ind. a du 02/11/04 # ETAT : valid ################################################################################ ################################################################################ # Copyright 2004 to infinity and beyond..., Ocsimize. # This template may not be reproduced or modified # without permission from Ocsimize. Ocsimize does not assume # liability for the use of this template or the results # obtained from using it as long as it is not validated by the final user. # Usage of this template is allowed for customers of Ocsimize's customers ################################################################################ #==============================================================================# element template hydro2pneu p1 out = temp_int #==============================================================================# ################################################################################ # # MODIFICATION # # 02/11/04: creation ################################################################################ # # pins # ################################################################################ # Name Type Signification # # p1 hyd_mks flow input # out pneumatic_mks flow output # ################################################################################ # # Parameters definition # ################################################################################ # Name Default value Signification # # temp_int temp temperature # ################################################################################ # # Postprocess information # ################################################################################ # Name Unit Signification # # p1_abs N/m2 (Pa) absolute pressure # rho_in_air kg/m3 volumic mass # q m3/s fluid like flow # qa kg/s gas like flow # ################################################################################ ################################################################################ # # This template translate a fluid flow (p, m3/s) # to a pneumatic flow (p,kg/s) # # # Use : # # ----------- # (p1) O---| |-----O (out) # | | # ----------- # ################################################################################ # Notes : ################################################################################ # This could be helpful : # # unit {"kg", "Kilogram", "Mass"} m_kg # unit {"g/s", "gram per second", "Massic flow"} q_gps # unit {"Kg/s", "Kilogramme par second", "Debit massique"} q_kgps # # unit {"kg/m3", "kilogram/m**3", "Volumic flow"} mv_kgpm3 # # pin pneumatic_mks across p_Npm2 through q_kgps # # IMPORTANT : Gas is supposed to be air # ################################################################################ pneumatic_mks out hyd_mks p1 number temp_int = undef external number temp,patm,rho { var q_kgps qa val q_m3ps q val p_Npm2 p1_abs val mv_kgpm3 rho_in_air number r=287 number rt, tg0 # #---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 parameters { if( temp_int == undef) { tg0 = unitconv(temp, "temp_degK") } else if(temp_int ~= undef) { tg0 = unitconv(temp_int, "temp_degK") } rt = r * tg0 } # #---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 values { p1_abs = p_Npm2(p1) - patm rho_in_air = p1_abs/rt q = qa / rho_in_air } # #---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 equations { q_m3ps(p1) += q q_kgps(out) -= qa qa : p_Npm2(p1) = p_Npm2(out) } }