Hi there,

I'm attempting to implement an operator-split scheme that requires me to
apply an Adams Bashforth scheme to a convection term (distinct from other
terms, like diffusion or reaction). The Fipy example covering the similar
Crank-Nicholson scheme showed the approach for an entire equation, however,
not a single term.

What I'd like to be able to do is assign a term to a CellVariable, so that
I could perform the AB2 averaging with the current value of the variable
and the old value of the variable, something like this:

-----------------8<----------------------

MyConvectionTerm = CellVariable(mesh=m, hasOld=True, value=0.)

MyConvectionTerm = ConvectionTerm(mycoeff) # initial convection term value

while t < ttotal:

    [...]

    ContinuityConvection.updateOld()
    MyConvectionTerm = (3./2.)*ConvectionTerm(mycoeff) -
(1./2.)*MyConvectionTerm.old()

    [...]

------------------8<-------------------------

However, I can't figure out how to make terms and variables compatible. Any
ideas on how I can do this? How can I store old values of terms?

Thanks!



Charles
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to