Ignore:
Timestamp:
Jan 30, 2007, 3:20:24 PM (16 years ago)
Author:
gerson bicca
Message:

testing some modifications for the new language

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/eml/heat_exchangers/HeatExchangerSimplified.mso

    r139 r143  
    332332        Outlet.Cold.z=Inlet.Cold.z;
    333333       
    334 "No Phase Change In Cold Stream"
    335         Inlet.Cold.v=Outlet.Cold.v;
    336 
    337 "No Phase Change In Hot Stream"
    338         Inlet.Hot.v=Outlet.Hot.v;
     334#"No Phase Change In Cold Stream"
     335#       Inlet.Cold.v=Outlet.Cold.v;
     336
     337#"No Phase Change In Hot Stream"
     338#       Inlet.Hot.v=Outlet.Hot.v;
    339339
    340340#======================================
     
    445445PARAMETERS
    446446
    447         Side as Integer         (Brief="Flow Direction",Lower=0,Upper=1);
    448 
    449 SET
    450 
    451 # Return Flow Direction
    452         Side = HE.FlowDir();
    453 
    454 EQUATIONS
    455 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
    456 #       Flow Direction
    457 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
    458 if Side equal 0
    459 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
    460 #       Cocurrent Flow
    461 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#   
    462         then
     447        FlowDirection as Switcher(Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent");
     448
     449EQUATIONS
     450
     451switch FlowDirection
     452       
     453        case "cocurrent":
     454
    463455"Temperature Difference at Inlet"
    464456        DT0 = Inlet.Hot.T - Inlet.Cold.T;
     
    467459        DTL = Outlet.Hot.T - Outlet.Cold.T;
    468460
    469         else
    470 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
    471 #       Counter Flow
    472 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#           
     461case "counter":
     462       
    473463"Temperature Difference at Inlet"
    474464        DT0 = Inlet.Hot.T - Outlet.Cold.T;
     
    534524PARAMETERS
    535525
    536 Side as Integer (Brief="Flow Direction",Lower=0,Upper=1);
    537 
    538 SET
    539 
    540 Side = HE.FlowDir(); # Return Flow Direction
     526        FlowDirection as Switcher(Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent");
    541527
    542528EQUATIONS
     
    545531       
    546532        then   
    547 "Effectiveness"
    548533        Eft = 1-exp(-Details.NTU);
    549534       
    550535        else
    551536
    552 if Side equal 0
     537switch  FlowDirection
     538
     539        case "cocurrent":
     540       
     541if Details.Cr equal 1
    553542
    554543        then
     544        Eft = Details.NTU/(1+Details.NTU);
     545        else
    555546"Effectiveness in Cocurrent Flow"
    556547        Eft = (1-exp(-Details.NTU*(1+Details.Cr)))/(1+Details.Cr);
    557        
    558         else
     548
     549end
     550
     551        case "counter":
    559552
    560553if Details.Cr equal 1
     
    575568end
    576569
    577        
    578570end
    579571
Note: See TracChangeset for help on using the changeset viewer.