Skip to content

Commit

Permalink
Fixed processfluxes for interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ssun30 committed Oct 22, 2024
1 parent 5683596 commit f9a0509
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/EdgeAnalysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ function processfluxes(sim::SystemSimulation,
end
for d in sim.interfaces
if hasproperty(d,:rxnarray)
interspecieslist = vcat(d.domain1.phase.species, d.domain2.phase.species)
@inbounds for i = 1:size(d.rxnarray)[2]
if @inbounds any(d.rxnarray[:,i].>length(corespeciesconcentrations))
continue
Expand All @@ -383,8 +384,8 @@ function processfluxes(sim::SystemSimulation,
@inbounds corespeciesconsumptionrates[d.rxnarray[j,i]] += frts[i+index]
@inbounds corespeciesproductionrates[d.rxnarray[j,i]] += rrts[i+index]
corespeciesnetconsumptionrates[d.rxnarray[j,i]] += net_forward_rate
if d.phase.species[d.rxnarray[j,i]].radicalelectrons == 1
coreradicalnetterminationrates[d.rxnarray[j,i]] += net_forward_rate * abs(min(d.phase.reactions[i].radicalchange, 0.0))
if interspecieslist[d.rxnarray[j,i]].radicalelectrons == 1
coreradicalnetterminationrates[d.rxnarray[j,i]] += net_forward_rate * abs(min(d.reactions[i].radicalchange, 0.0))
end
else
break
Expand All @@ -396,8 +397,8 @@ function processfluxes(sim::SystemSimulation,
@inbounds corespeciesproductionrates[d.rxnarray[j,i]] += frts[i+index]
@inbounds corespeciesconsumptionrates[d.rxnarray[j,i]] += rrts[i+index]
corespeciesnetconsumptionrates[d.rxnarray[j,i]] += net_reverse_rate
if d.phase.species[d.rxnarray[j,i]].radicalelectrons == 1
coreradicalnetterminationrates[d.rxnarray[j,i]] += net_reverse_rate * abs(min(-d.phase.reactions[i].radicalchange, 0.0))
if interspecieslist[d.rxnarray[j,i]].radicalelectrons == 1
coreradicalnetterminationrates[d.rxnarray[j,i]] += net_reverse_rate * abs(min(-d.reactions[i].radicalchange, 0.0))
end
else
break
Expand Down

0 comments on commit f9a0509

Please sign in to comment.