Skip to content

Commit 6fe4549

Browse files
committed
Modify kLAkHCondensationEvaporationWithReservoir
Record V of the reservoir. V is needed when the reservoir is liquid due to the use of kLA. Modify docstring.
1 parent 0bfd28e commit 6fe4549

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/Interface.jl

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -273,21 +273,22 @@ export Outlet
273273

274274
"""
275275
kLAkHCondensationEvaporationWithReservoir adds evaporation and condensation to
276-
(1) a liquid phase domain with a constant composition vapor resevoir, where molefractions, P, and T need to be specified, or
276+
(1) a liquid phase domain with a constant composition vapor resevoir, where number of moles, P, and T need to be specified, or
277277
(2) a gas phase domain with a constant composition liquid resevoir, where number of moles, V, and T need to be specified.
278278
kLA and kH are used to model cond/evap.
279-
kLA is liquid volumetric mass transfer coefficient with unit 1/s , and kH is Henry's law constant.
279+
kLA is liquid volumetric mass transfer coefficient with unit 1/s , and kH is Henry's law constant defined as gas phase partial pressure of solute over liquid phase concentration of solute.
280280
"""
281281

282-
struct kLAkHCondensationEvaporationWithReservoir{S,V1<:AbstractArray,V2<:Real,V3<:Real,V4<:AbstractArray,V5<:Real,V6<:AbstractArray,V7<:AbstractArray} <: AbstractBoundaryInterface
282+
struct kLAkHCondensationEvaporationWithReservoir{S,V1<:AbstractArray,V2<:Real,V3<:Real,V4<:Real,V5<:AbstractArray,V6<:Real,V7<:AbstractArray,V8<:AbstractArray} <: AbstractBoundaryInterface
283283
domain::S
284284
molefractions::V1
285285
T::V2
286286
P::V3
287-
cs::V4
288-
H::V5
289-
kLAs::V6
290-
kHs::V7
287+
V::V4
288+
cs::V5
289+
H::V6
290+
kLAs::V7
291+
kHs::V8
291292
end
292293

293294
function kLAkHCondensationEvaporationWithReservoir(domain::D,conddict::Dict{X1,X}) where {D,X1,X}
@@ -303,14 +304,15 @@ function kLAkHCondensationEvaporationWithReservoir(domain::D,conddict::Dict{X1,X
303304
@error "P needs to be specified for the vapor resevoir over the liquid phase domain"
304305
end
305306
P = conddict["P"]
306-
return kLAkHCondensationEvaporationWithReservoir(domain,molefractions,T,P,Array{Float64,1}(),H,kLAs,kHs)
307+
V = sum(y)*R*T/P
308+
return kLAkHCondensationEvaporationWithReservoir(domain,molefractions,T,P,V,Array{Float64,1}(),H,kLAs,kHs)
307309
elseif isa(domain.phase,IdealGas)
308310
if !haskey(conddict,"V")
309311
@error "V needs to be specified for the liquid resevoir under the gas phase domain"
310312
end
311313
V = conddict["V"]
312314
cs = y./V
313-
return kLAkHCondensationEvaporationWithReservoir(domain,Array{Float64,1}(),T,1e8,cs,H,kLAs,kHs)
315+
return kLAkHCondensationEvaporationWithReservoir(domain,Array{Float64,1}(),T,1e8,V,cs,H,kLAs,kHs)
314316
end
315317
end
316318

0 commit comments

Comments
 (0)