Skip to content

Commit 2e0e612

Browse files
mjohnson541ssun30
authored andcommitted
add phi and d to newer domains
1 parent 5885823 commit 2e0e612

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/Domain.jl

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,8 @@ mutable struct FragmentBasedConstantTrhoDomain{N<:AbstractPhase,S<:Integer,W<:Re
740740
constantspeciesinds::Array{S,1}
741741
T::Float64
742742
rho::Float64
743+
phi::W
744+
d::W
743745
A::Float64
744746
kfs::Array{W,1}
745747
krevs::Array{W,1}
@@ -766,6 +768,8 @@ function FragmentBasedConstantTrhoDomain(; phase::Z, initialconds::Dict{X,E}, co
766768
mass = 0.0
767769
P = 1.0e8
768770
A = 0.0
771+
phi = 0.0 #default 0
772+
d = 0.0
769773

770774
fragmentnames = getfield.(getphasespecies(phase), :name)
771775

@@ -781,6 +785,10 @@ function FragmentBasedConstantTrhoDomain(; phase::Z, initialconds::Dict{X,E}, co
781785
elseif key == "mass"
782786
mass = val
783787
y0[end] = val
788+
elseif key == "Phi"
789+
phi = val
790+
elseif key == "d"
791+
d = val
784792
else
785793
ind = findfirst(isequal(key), fragmentnames)
786794
@assert typeof(ind) <: Integer "$key not found in fragment list: $fragmentnames"
@@ -829,7 +837,7 @@ function FragmentBasedConstantTrhoDomain(; phase::Z, initialconds::Dict{X,E}, co
829837
end
830838
rxnarray = getreactionindices(phase)
831839
return FragmentBasedConstantTrhoDomain(phase, [1, length(fragmentnames), length(fragmentnames) + 1], [1, length(phase.species) + length(phase.reactions)], constspcinds,
832-
T, rho, A, kfs, krevs, kfsnondiff, efficiencyinds, Gs, rxnarray, mu, diffs, jacobian, sensitivity, false, MVector(false), MVector(0.0), p, Dict("mass" => length(fragmentnames) + 1)), y0, p
840+
T, rho, phi, d, A, kfs, krevs, kfsnondiff, efficiencyinds, Gs, rxnarray, mu, diffs, jacobian, sensitivity, false, MVector(false), MVector(0.0), p, Dict("mass" => length(fragmentnames) + 1)), y0, p
833841
end
834842

835843
export FragmentBasedConstantTrhoDomain
@@ -842,6 +850,7 @@ mutable struct ConstantTLiqFilmDomain{N<:AbstractPhase,S<:Integer,W<:Real,W2<:Re
842850
T::W
843851
epsilon::W
844852
phi::W
853+
d::W
845854
kfs::Array{W,1}
846855
krevs::Array{W,1}
847856
kfsnondiff::Array{W,1}
@@ -866,6 +875,7 @@ function ConstantTLiqFilmDomain(; phase::Z, initialconds::Dict{X,E}, constantspe
866875
V = 0.0
867876
P = 1.0e8
868877
phi = 0.0
878+
d = 0.0
869879
epsilon = 0.0
870880
y0 = zeros(length(phase.species) + 1)
871881
spnames = [x.name for x in phase.species]
@@ -879,6 +889,10 @@ function ConstantTLiqFilmDomain(; phase::Z, initialconds::Dict{X,E}, constantspe
879889
y0[end] = val
880890
elseif key == "epsilon"
881891
epsilon = val
892+
elseif key == "Phi"
893+
phi = val
894+
elseif key == "d"
895+
d = val
882896
else
883897
ind = findfirst(isequal(key), spnames)
884898
@assert typeof(ind) <: Integer "$key not found in species list: $spnames"
@@ -922,7 +936,7 @@ function ConstantTLiqFilmDomain(; phase::Z, initialconds::Dict{X,E}, constantspe
922936
end
923937
rxnarray = getreactionindices(phase)
924938
return ConstantTLiqFilmDomain(phase, [1, length(phase.species), length(phase.species) + 1], [1, length(phase.species) + length(phase.reactions)], constspcinds,
925-
T, epsilon, phi, kfs, krevs, kfsnondiff, efficiencyinds, Gs, rxnarray, mu, diffs, jacobian, sensitivity, false, MVector(false), MVector(0.0), p, Dict{String,Int64}(["V" => length(phase.species) + 1])), y0, p
939+
T, epsilon, phi, d, kfs, krevs, kfsnondiff, efficiencyinds, Gs, rxnarray, mu, diffs, jacobian, sensitivity, false, MVector(false), MVector(0.0), p, Dict{String,Int64}(["V" => length(phase.species) + 1])), y0, p
926940
end
927941

928942
export ConstantTLiqFilmDomain

0 commit comments

Comments
 (0)