Hi John,

Thank you for your answer.  Just to clarify that the mesh is static throughout 
time, so old_solution would be stored in terms of the coordinates 
$\mathbf{x}^{j+1}$.   I want to find out the old_solutions at the points 
$((\delta t) \mathbf{u}^{j+1} + \mathbf{x}^{j+1})$ so i can evaluate the 
solution using the method of characteristics.  I know how to do this using my 
own FE code, but I've failed to work out how to implement it in deal.ii.

Hope that makes sense?

Katie

________________________________
From: John Chapman [[email protected]]
Sent: 04 April 2011 14:48
To: Katie Leonard
Cc: [email protected]
Subject: Re: [deal.II] Solving extension of Step-21 using method of 
characteristics

Hi Katie,

If you have refinement then you should try SolutionTransfer (which is covered 
in several of the tutorial examples, step-15 first of all). If not can you  
just save the old solution at the end of the do...while timestep loop and then 
use fe_values.get_function_values(old_solution, old_solution_values)?

If I have misunderstood your question, please clarify!

John

John Chapman
www.maths.dur.ac.uk/~tphj28<http://www.maths.dur.ac.uk/~tphj28>



On 04/04/11 14:31, Katie Leonard wrote:
Hello everyone,

I am new to Deal.ii and I am having an issue implementing a problem, which is 
an extension of step-21.  To iterate through time I am solving the equation 
(which is analogous to the saturation equation in step-21):

$\frac{\partial C}{\partial t} + \mathbf{u} \cdot \nabla C = F(C, \mathbf{u}) + 
\nabla^2 C$

given $\mathbf{u}$ and $C(0)$.  For stability purposes, we solve this using the 
method of characteristics i.e.

$\frac{\mathrm{d} C}{\mathrm{d} t} = F(C, \mathbf{u} ) + \nabla^2 C   $
on the line
$\frac{\mathrm{d} \mathbf{x} }{\mathrm{d} t} = \mathbf{u}$


and discretising time (with timestep \delta t) gives:

$\frac{C^{j+1} - C^j}{\delta t} = F(C^{j+1}, \mathbf{u}^{j+1} ) + \nabla^2 
C^{j+1}   $
on
$\frac{ \mathbf{x}^{j+1} - \mathbf{x}^j }{\delta t} = \mathbf{u}^{j+1}$

So,
$\frac{C^{j+1}(\mathbf{x}^{j+1} ) - C^j ((\delta t) \mathbf{u}^{j+1} + 
\mathbf{x}^{j+1}) }{\delta t} = F(C^{j+1}(\mathbf{x}^{j+1} ) , 
\mathbf{u}^{j+1}(\mathbf{x}^{j+1} ) ) + \nabla^2 C^{j+1}   (\mathbf{x}^{j+1} ) $



My problem is that, at each timestep I need to be able to find out the previous 
solution for C at the points on the domain $((\delta t) \mathbf{u}^{j+1} + 
\mathbf{x}^{j+1})$ to give the solution C^{j+1}(\mathbf{x}^{j+1} )



Many thanks,

K L



_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to