################################################################################ # 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 ################################################################################ #==============================================================================# element template pneu2hydro in p2 = temp_int #==============================================================================# ################################################################################ # 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 ################################################################################ ################################################################################ # # MODIFICATION # # 02/11/04: creation ################################################################################ # # pins # ################################################################################ # Name Type Signification # # p2 hyd_mks flow output # in pneumatic_mks flow input # ################################################################################ # # Parameters definition # ################################################################################ # Name Default value Signification # # temp_int temp temperature # ################################################################################ # # Postprocess information # ################################################################################ # Name Unit Signification # # p2_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 pneumatic flow (p,kg/s) # to a fluid flow (p, m3/s) # # # Use : # # ----------- # (in) O---| |-----O (p2) # | | # ----------- # ################################################################################ # 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 in hyd_mks p2 number temp_int = undef external number temp,patm,rho { val q_kgps qa var q_m3ps q val p_Npm2 p2_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 { p2_abs = p_Npm2(p2) - patm rho_in_air = p2_abs/rt qa = q * rho_in_air } # #---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 equations { q_kgps(in) += qa q_m3ps(p2) -= q q : p_Npm2(in) = p_Npm2(p2) } }