-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using PrecompileTools: @setup_workload, @compile_workload | ||
@setup_workload begin | ||
# Putting some things in `@setup_workload` instead of `@compile_workload` can reduce the size of the | ||
# precompile file and potentially make loading faster. | ||
|
||
@compile_workload begin | ||
# all calls in this block will be precompiled, regardless of whether | ||
# they belong to your package or not (on Julia 1.8 and higher) | ||
# Input parameters | ||
mumax = 20; KM = 3; | ||
p = ( | ||
# --------------------- # | ||
# Simulation Parameters # | ||
# --------------------- # | ||
Title = "Single Solute and Particulate Case", | ||
tFinal = 1.0, # Simulation time [days] | ||
tol = 1e-2, # Tolerance | ||
outPeriod =0.1, # Time between outputs [days] | ||
makePlots = true, | ||
savePlots = true, | ||
|
||
# ---------------------- # | ||
# Particulate Parameters # | ||
# ---------------------- # | ||
XNames =["Heterotroph"], # Particulate names | ||
Xto = [10.0], # Tank particulate concentration initial condition(s) | ||
Pbo = [0.08], # Biofilm particulates volume fraction initial condition(s) | ||
rho = [2.0E4], # Particulate densities | ||
Kdet = 20000.0, # Particulates detachment coefficient | ||
srcX = [(S,X,Lf,t,z,p) -> 0.0], # Source of particulates | ||
# Growthrates for each particulate | ||
mu = [(S,X,Lf,t,z,p) -> (mumax * S[1]) ./ (KM .+ S[1])], | ||
|
||
# ----------------- # | ||
# Solute Parameters # | ||
# ----------------- # | ||
SNames =["Nutrient"], # Solute names | ||
Sin = [(t) -> 100], # Solute inflow (can be function of time) | ||
Sto = [10.0], # Tank solute concentration initial condition(s) | ||
Sbo = [0.0], # Biofilm solutes concentration initial condition(s) | ||
Yxs = [2.646], # Biomass yield coefficient on solute | ||
Dt = [4.0E-5], # Aquious solute diffusion through tank fluid | ||
Db = [6.9E-5], # Effective solute diffusion through biofilm | ||
srcS = [(S,X,Lf,t,z,p) -> 0.0], # Source of solutes | ||
|
||
# --------------- # | ||
# Tank Parameters # | ||
# --------------- # | ||
V = 0.1, # Volume of tank [m³] | ||
A = 1, # Surface area of biofilm [m²] | ||
Q = 1, # Flowrate through tank [m³/d] | ||
|
||
# ------------------ # | ||
# Biofilm Parameters # | ||
# ------------------ # | ||
Nz = 50, # Number of grid points in biofilm | ||
Lfo = 1.0E-5, # Biofilm initial thickness [m] | ||
LL = 1.00E-7, # Boundary layer thickness [m] | ||
) | ||
|
||
t,zm,Xt,St,Pb,Sb,Lf,sol = BiofilmSolver(p) # Run solver | ||
biofilm_plot(sol,p) # Plot final results | ||
end | ||
end |