(Sorry if you get this twice - accidentally sent from a wrong, non-list
member address the first time.)

On Tue, Feb 14, 2012 at 3:16 AM, Daniel Wheeler
<[email protected]>wrote:

>  On Sat, Feb 11, 2012 at 3:07 AM, Michael Brown <
> [email protected]> wrote:
>
>> Hi all,
>>
>> I'm totally new to FiPy (and finite volume methods generally) so I
>> apologize if this is a silly question.
>
>
> Thanks for your interest in FiPy. This is actually a difficult problem to
> solve with current versions of FiPy. It's certainly not a silly question.
>
>

Hi Daniel,

Thanks for your help. Even if I don't end up using FiPy for my current
project, it looks like a great package and I'll definitely keep it in mind
for the future/recommend it.


>  I need to solve a semilinear
>> wave equation of the form (in 1 dimension):
>>
>> utt - uxx = f(x, u)
>>
>  ...
>>
>  I think a better substitution is
>
>   v_t = u_x + g
>
> where g_x = f, so you end up solving a hyperbolic system of the form
>
>   v_t - u_x = g
>
>   u_t - v_x = 0
>
> This enables the solution in a fully coupled manner using Riemann solution
> type flux updates allowing the coupled nature of the equations to be used
> in the interpolation.
> Solving with standard non-coupled interpolation (currently used in FiPy)
> leads to decoupling of the solution variables.
>
>
Okay,  just to be clear: when you say g_x = f you mean only differentiation
with respect to the explicit x dependence of g? Actually, it might help
that to an excellent approximation I can separate f(x, u) = f1(x) + f2(u),
although I get (setting g_x = f1(x)) an integro-differential equation:


v_t - u_x = g
u_t - v_x = \int f2(u) dt

Also, how would this method extend to two or three dimensions?

 Unfortunately the Riemann type flux updates have not been fully integrated
> into FiPy yet. This is available on a research branch of the code if you
> are feeling brave. The branch is fairly mature, but use at your own risk.
> It requires cython to be installed. See
>
>   <http://matforge.org/fipy/browser/branches/riemann>
>
> There are a two examples
>
>   <
> http://matforge.org/fipy/browser/branches/riemann/examples/riemann/acoustics.py
> >
>
> and
>
>   <
> http://matforge.org/fipy/browser/branches/riemann/examples/riemann/rotation.py
> >
>
> The first solves the linearized acoustics equations in 1D. The second
> solves a single advection equation in 2D for a rotating square.
>

The acoustics link is dead atm - even browsing to it through the repo
brings me to an error page. The others work though. I'll try the Riemann
branch.


>
>
>> But it's still not quite in the standard form for FiPy. I'm guessing I'd
>> have to write the uxx term as a source term? Is FiPy suited to this
>> kind of problem - and if not can you recommend another (preferably open
>> source) tool? I'd appreciate any advice.
>>
>
> You could also try CLAWPACK as an alternative.
>
> Thanks, I'll check it out.

Cheers,
Michael Brown
_______________________________________________
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