On Mon, Sep 28, 2009 at 3:39 PM, Kun-Dar Li <[email protected]> wrote:
> I'm not sure what is a plain old QUICK scheme. Do you have more information
> about it?
A second order Taylor expansion using three cell center values, one
upwind cell center and two cell centers to evaluate the face value.
> I also had met a difficulty to define the boundary conditions for my scheme
> (convTerm=(convCoeff*var.getArithmeticFaceValue()).getDivergence()).
> Would please show me how to include the boundary conditions in my scheme, so
> I may get a similar result as Van Leer or a higher order scheme?
Well, if you are using a 1D periodic grid you won't need to worry
about boundary conditions. In order to change the scheme from a first
order central difference, the face value needs to be modified
("var.getArithmeticFaceValue()"). In general,it is how you approximate
this face value that determines the type of scheme. Look at the how
<http://matforge.org/fipy/browser/trunk/fipy/variables/arithmeticCellToFaceVariable.py>
term is implemented and that might give you a clue on how to write a
different face value calculation. A higher order will also require
getting cell values that are no longer adjacent to the face value,
which may be more tricky.
If you are doing this all in 1D and explicit, you may want to just
want to do this with numpy alone. It is relatively easy to implement
different advection schemes this way and you won't have the various
fipy vagaries impeding your progress. Obviously, as you go to higher
dimensions and to implicit with other terms coupled in you'll then
need fipy, but for simply evaluating 1D explicit advection schemes I
would recommend using numpy alone.
Hope this helps
--
Daniel Wheeler