Skip to content
Snippets Groups Projects
Commit ccabe34e authored by martamestroni's avatar martamestroni
Browse files

Working with InterfaceTry.jl. It was not k, but the adaptive time stepping...

Working with InterfaceTry.jl. It was not k, but the adaptive time stepping giving stability for D>1. For now easy fix.
parent 61184537
Branches Troubleshooting-oscillations
No related tags found
No related merge requests found
......@@ -225,7 +225,7 @@ function solve_D(geometry,IC,AG,B,u0E,P,D_i,D_o,Δx,Δt,
Nb = Int((BP-L)/Δx+3); # Position of left ghost point
elseif AG=="Y"
if D_i<1
if D_i<1 || B=="E"
Δxi=sqrt(D_i/2*Δt)
Δxo=sqrt(D_o/2*Δt)
Ni=Int(round((BP-L)/Δxi))
......@@ -362,6 +362,8 @@ function solve_D(geometry,IC,AG,B,u0E,P,D_i,D_o,Δx,Δt,
t=2*Δt
i=3
#time stepping
while t<=T
#b(i) and A(i)
......@@ -371,7 +373,6 @@ function solve_D(geometry,IC,AG,B,u0E,P,D_i,D_o,Δx,Δt,
A=make_A(geometry,B,α_i(D_i,Δt,Δxi), α_i(D_i,Δt,Δxo),
Δxi, Δxo, x, D_i, D_o, length(x), Nb, P,
BE_t(round(Δt*(i-1),digits=length(string(Δt))-2)), k)
# giving problems in InterfaceTry
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment