-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathboiling-2012-steady.fee
More file actions
71 lines (59 loc) · 2.3 KB
/
Copy pathboiling-2012-steady.fee
File metadata and controls
71 lines (59 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
##############################
# vertical boiling channel with arbitrary power distribution
# steady-state computation of the continuous
# boiling channel problem
# as presented at ENIEF 2012
# updated to work with FeenoX
# jeremy@seamplex.com
##############################
IMPLICIT NONE
DEFAULT_ARGUMENT_VALUE 1 uniform
DEFAULT_ARGUMENT_VALUE 2 6.5
DEFAULT_ARGUMENT_VALUE 3 9.5
# first define some variables
VAR z' lambda Nsub Npch Eu Fr Lambda ki ke norm
# the problem parameters
# (remember, the difficulty relies in computing Npch as a function of the rest)
Nsub = $2
Eu = $3
Fr = 1
Lambda = 3
ki = 6
ke = 2
# include the steady-state power profile from a file:
INCLUDE boiling-2012-$1.fee
# the transient space-dependant power profile in this case
# is constant and equal to the steady-state profile
q(z,t) = qstar(z)
# define the boiling boundary as a function of Npch
lambdastar(Npch) = root(integral(qstar(z'), z', 0, z) - Nsub/Npch, z, 0, 1)
# this expression appears several times, so it is handy to have it as a function
q2phistar(z,Npch) = integral(qstar(z'), z', lambdastar(Npch), z)
# define the function that has to be zero when the phase-change number is correctly defined
F(Npch) = {
(Nsub/Npch + Nsub*q2phistar(1,Npch))^2/(1 + Npch * q2phistar(1,Npch))
- (Nsub/Npch)^2
+ Lambda*(Nsub/Npch)^2*lambdastar(Npch)
+ Lambda*integral((Nsub/Npch + Nsub*q2phistar(z,Npch))^2/(1 + Npch*q2phistar(z,Npch)), z, lambdastar(Npch), 1)
+ ki*(Nsub/Npch)^2
+ ke*(Nsub/Npch + Nsub*q2phistar(1,Npch))^2 / (1 + Npch*q2phistar(1,Npch))
+ 1/Fr * (lambdastar(Npch) + integral(1/(1 + Npch*q2phistar(z,Npch)), z, lambdastar(Npch), 1))
- Eu
}
# define the steady-state solutions
ustar(z) = if(z<lambda, Nsub/Npch, Nsub/Npch + Nsub * integral(qstar(z'), z', lambda, z))
hstar(z) = -Nsub/Npch + integral(qstar(z'), z', 0, z)
rhostar(z) = if(z<lambda, 1, 1/(1 + Npch * integral(qstar(z'), z', lambda, z)))
Npch = root(F(Npch), Npch, Nsub+1e-3, 50)
lambda = lambdastar(Npch)
# print the results
PRINT TEXT "\# vertical boiling channel"
PRINT TEXT "\# Npch = " Npch
PRINT TEXT "\# Nsub = " Nsub
PRINT TEXT "\# Fr = " Fr
PRINT TEXT "\# Lambda = " Lambda
PRINT TEXT "\# ki = " ki
PRINT TEXT "\# ke = " ke
PRINT TEXT "\# Eu = " Eu
PRINT TEXT "\# lambda* = " lambda
PRINT_FUNCTION qstar ustar hstar rhostar MIN 0 MAX 1 STEP 1e-3