Skip to content

Commit 299697f

Browse files
authored
Merge pull request #188 from ReactionMechanismGenerator/fix_bug
Fix bug: d should be domain
2 parents 30d3756 + 509a271 commit 299697f

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/Domain.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ end
18511851
@inbounds @fastmath jac[i,i] -= kLAs[i]/kHs[i]
18521852
end
18531853
@views @inbounds @fastmath jac[domain.indexes[1]:domain.indexes[2],domain.indexes[3]] .-= kLAs./kHs*R*T/P
1854-
elseif isa(inter,VolumetricFlowRateOutlet) && d == inter.domain
1854+
elseif isa(inter,VolumetricFlowRateOutlet) && domain == inter.domain
18551855
# outlet
18561856
# d/dni(dV/dt) = dflow/dni*R*T/P = inter.Vout(t)/V*R*T/P = inter.Vout(t)/N
18571857
# d/dV(dV/dt) = dflow/dV *R*T/P = -inter.Vout(t)*sum(ns)/V^2 *R*T/P = -inter.Vout(t)/V*sum(ns)/N
@@ -2033,7 +2033,7 @@ end
20332033
@inbounds jac[domain.indexes[3],i] -= ddnidTdt
20342034
@inbounds @fastmath jac[domain.indexes[4],i] -= kLAs[i]/kHs[i]*R*T/V + P/T*ddnidTdt
20352035
end
2036-
elseif isa(inter,VolumetricFlowRateOutlet) && d == inter.domain
2036+
elseif isa(inter,VolumetricFlowRateOutlet) && domain == inter.domain
20372037
# outlet
20382038
# flow = inter.Vout(t)*sum(ns)/V
20392039
# dflowdni = inter.Vout(t)/V
@@ -2262,7 +2262,7 @@ end
22622262
@inbounds @fastmath jac[i,i] -= kLAs[i]/kHs[i]
22632263
end
22642264
@views @inbounds @fastmath jac[domain.indexes[4],domain.indexes[1]:domain.indexes[2]] .-= kLAs./kHs*R*T/P
2265-
elseif isa(inter,VolumetricFlowRateOutlet) && d == inter.domain
2265+
elseif isa(inter,VolumetricFlowRateOutlet) && domain == inter.domain
22662266
# outlet
22672267
# dTdt = 0
22682268
# d/dni (dV/dt) = dflow/dni *R*T/P = inter.Vout/V*R*T/P = inter.Vout/N
@@ -2346,7 +2346,7 @@ end
23462346
@inbounds @fastmath jac[i,i] -= kLAs[i]/kHs[i]
23472347
end
23482348
@views @inbounds @fastmath jac[domain.indexes[3],domain.indexs[1]:domain.indexes[2]] .-= kLAs./kHs*R*T/P
2349-
elseif isa(inter,VolumetricFlowRateOutlet) && d == inter.domain
2349+
elseif isa(inter,VolumetricFlowRateOutlet) && domain == inter.domain
23502350
# outlet
23512351
# d/dni(dV/dt) = dflow/dni*R*T/P = inter.Vout(t)/V*R*T/P = inter.Vout(t)/N
23522352
# d/dV(dV/dt) = dflow/dV *R*T/P = -inter.Vout*sum(ns)/V^2*R*T/P = -inter.Vout/V*sum(ns)/N
@@ -2453,7 +2453,7 @@ end
24532453
@inbounds jac[domain.indexes[3],i] -= ddnidTdt
24542454
@inbounds @fastmath jac[domain.indexes[4],i] -= kLAs[i]/kHs[i]*R*T/V + P/T*ddnidTdt
24552455
end
2456-
elseif isa(inter,VolumetricFlowRateOutlet) && d == inter.domain
2456+
elseif isa(inter,VolumetricFlowRateOutlet) && domain == inter.domain
24572457
# outlet
24582458
# flow = inter.Vout(t)*sum(ns)/V
24592459
# dflowdni = inter.Vout(t)/V
@@ -2585,7 +2585,7 @@ end
25852585
@inbounds @fastmath jac[i,i] -= kLAs[i]/kHs[i]
25862586
end
25872587
@views @inbounds @fastmath jac[domain.indexes[4],domain.indexes[1]:domain.indexes[2]] .-= kLAs./kHs*R*T/P
2588-
elseif isa(inter,VolumetricFlowRateOutlet) && d == inter.domain
2588+
elseif isa(inter,VolumetricFlowRateOutlet) && domain == inter.domain
25892589
# outlet
25902590
# dTdt = 0
25912591
# d/dni (dV/dt) = dflow/dni *R*T/P = inter.Vout/V*R*T/P = inter.Vout/N
@@ -2632,7 +2632,7 @@ end
26322632
@simd for i in domain.indexes[1]:domain.indexes[2]
26332633
@inbounds @fastmath jac[i,i] -= kLAs[i]
26342634
end
2635-
elseif isa(inter,VolumetricFlowRateOutlet) && d == inter.domain
2635+
elseif isa(inter,VolumetricFlowRateOutlet) && domain == inter.domain
26362636
@simd for i in domain.indexes[1]:domain.indexes[2]
26372637
@inbounds @fastmath jac[i,i] -= inter.Vout(t)/V
26382638
end

0 commit comments

Comments
 (0)