Hello,
I’m working on solving the temperature advection-diffusion equation, but I am facing issues with the results. Below is the first approach I tried:
scalar source[];
foreach()
source[] = (((T[1,0]-T[]) - (T[]-T[-1,0])) / Delta / Delta
+ ((T[0,1]-T[]) - (T[]-T[0,-1])) / Delta / Delta);
face vector uf[];
foreach_face()
uf.x[] = (u.x[] + u.x[-1]) / 2.;
face vector flux[];
tracer_fluxes(T, uf, flux, dt, source);
foreach() {
T[] = T[] - dt * (flux.x[1,0] - flux.x[]) / Delta
- dt * (flux.y[0,1] - flux.y[]) / Delta;
}
boundary({T});
However, the results are incorrect. I then tried a different approach:
face vector uf[];
foreach_face()
uf.x[] = (u.x[] + u.x[-1]) / 2.;
face vector flux[];
tracer_fluxes(T, uf, flux, dt, zeroc);
scalar r[];
foreach()
foreach_dimension()
r[] -= (flux.x[1,0] - flux.x[]) / (Delta * cm[]);
mgstats mgd2 = diffusion(T, dt, r = r);
boundary({T});
Unfortunately, the results are still not correct. Could you kindly help me identify what I might be doing wrong or suggest a better approach?
Thank you in advance for your help!
diffusion (T, dt, kappaf, theta = Cp);--
You received this message because you are subscribed to the Google Groups "basilisk-fr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to basilisk-fr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/basilisk-fr/ac8e7b13-dccc-456d-a010-2add00eb0a77n%40googlegroups.com.