Skip to content
Discussion options

You must be logged in to vote

HI Bowen! Tracer is there for exactly this purpose -- to be used as a model for generic scalar advection. So you could use this for your level set variable.

Note these lines in NS_setup.cpp:

advectionType[Tracer] = NonConservative;
diffusionType[Tracer] = Laplacian_S;
if (do_cons_trac) {
  advectionType[Tracer] = Conservative;
  diffusionType[Tracer] = Laplacian_SoverRho;
  amrex::Print() << "Using conservative advection update for tracer.\n";
}

This says that the default advection scheme is non-conservative, i.e. d/dt(phi) + u dot grad phi = 0 is used to update phi. And the diffusion term if you use one doesn't have any density-weighting. You can change that by setting do_cons_trac if y…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Bowen0330
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants