/[ascend]/trunk/models/johnpye/tubebank.a4c
ViewVC logotype

Diff of /trunk/models/johnpye/tubebank.a4c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1726 by jpye, Wed Dec 26 09:28:29 2007 UTC revision 1727 by jpye, Tue Jan 15 23:03:20 2008 UTC
# Line 1  Line 1 
1  (*  (*
2      ASCEND model library: tube-bank view factor model      ASCEND model library: tube-bank view factor model
3      Copyright (C) John Pye 2007      Copyright (C) John Pye 2007-2008
4      http://pye.dyndns.org/      http://pye.dyndns.org/
5    
6      This program is free software; you can redistribute it      This program is free software; you can redistribute it
# Line 273  MODEL vfac_circle_plane_ambi( Line 273  MODEL vfac_circle_plane_ambi(
273  END vfac_circle_plane_ambi;  END vfac_circle_plane_ambi;
274    
275  (*  (*
276        Model for the view factor from a single tube to a surface beneath it.
277    *)
278    MODEL singletube;
279        x "x coordinate of tube centreline" IS_A delta_distance;
280        x1 "left end of flat surface" IS_A delta_distance;
281        x2 "right end of flat surface" IS_A delta_distance;
282        h "height from cylinder axis to surface" IS_A distance;
283        r "cylinder radius" IS_A distance;
284        s "cylinder half-spacing" IS_A distance;
285        
286        F1, F2 IS_A fraction;
287        vfac1 IS_A vfac_circle_plane_ambi(x1a,h,r,s,F1);
288        vfac2 IS_A vfac_circle_plane_ambi(x2a,h,r,s,F2);
289    
290        x1a, x2a IS_A delta_distance;
291        x1a = abs(x1 - x);
292        x2a = abs(x2 - x);
293    
294        CONDITIONAL
295            c1: (x1 - x) * (x2 - x) >= 0;
296            c3: x1a > x2a;
297        END CONDITIONAL;
298    
299        sameside IS_A boolean_var;
300        greater1 IS_A boolean_var;
301        sameside == SATISFIED(c1);
302        greater1 == SATISFIED(c3);
303    
304        expr1: F = F1 - F2;
305        expr2: F = F2 - F1;
306        exprS: F = F1 + F2;
307    
308        F "view factor from tube to surface x1--x2" IS_A fraction;
309        WHEN(sameside,greater1)
310            CASE TRUE,TRUE:
311                USE expr1;
312            CASE TRUE,FALSE:
313                USE expr2;
314            CASE FALSE,TRUE:
315                USE exprS;
316            CASE FALSE,FALSE:
317                USE exprS;
318        END WHEN;
319    
320        twoF IS_A fraction;
321        twoF = 2 * F;
322    METHODS
323    METHOD on_load;
324        FIX x; x:= 610 {mm};
325        FIX x1; x1 := -607.5 {mm};
326        FIX x2; x2 := +607.5 {mm};
327        FIX h; h := 200 {mm} - 23 {mm};
328        FIX r; r:= 20 {mm};
329        FIX s; s:= 22.5 {mm};
330        sameside := FALSE;
331        greater1 := TRUE;
332    END on_load;
333    END singletube;
334    
335    (*
336      Model of a tube bank (many tubes) facing opposite a      Model of a tube bank (many tubes) facing opposite a
337      flat surface. Model serves only to calculate the view      flat surface. Model serves only to calculate the view
338      factors, which will then be used elsewhere.      factors, which will then be used elsewhere.

Legend:
Removed from v.1726  
changed lines
  Added in v.1727

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22