Type of eqution to solve with FiPy

86 views
Skip to first unread message

Emanuele Di Palma

unread,
Oct 19, 2021, 10:47:35 AM10/19/21
to fipy
Daer all,
I'd like to solve with FiPy the PDE equation reported in the attached file;
I went through the manual and the examples without to find any solution.
Please, let me know if it's possible and eventually addressing toward some useful example.

Thanks for your attention.

Best regards
Emanuele Di Palma
equation.pdf

Daniel Wheeler

unread,
Oct 19, 2021, 1:11:40 PM10/19/21
to Emanuele Di Palma, fipy
Hi Emanuele,

I think this equation is tractable in FiPy with a few tricks.
Substituting a single variable for the first derivative in time will
give you two coupled equations. I'm assuming the terms in brackets
are fourth order terms (can you clarify that). You can also split out
the second order derivative of phi into another equation resulting in
three equations that can be coupled. The main equation will need a
diffusion term with an anisotropic coefficient. The coefficient will
have a diagonal of 0 and phi on the off diagonal. So to be clear here
are the three things you need to do

- Substitute out the second order time derivative
- Substitute out \nabla^2 \phi
- Use an anisotropic diffusion coefficient in the main equation

These examples are the best examples to get started.

- https://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.coupled.html

- https://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.nthOrder.input4thOrder1D.html

- https://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.anisotropy.html

- https://www.ctcms.nist.gov/fipy/examples/phase/generated/examples.phase.anisotropy.html

- https://www.ctcms.nist.gov/fipy/examples/phase/generated/examples.phase.polyxtalCoupled.html

- https://www.ctcms.nist.gov/fipy/examples/cahnHilliard/generated/examples.cahnHilliard.mesh2DCoupled.html

I hope that helps.
> --
> To unsubscribe from this group, send email to fipy+uns...@list.nist.gov
>
> View this message at https://list.nist.gov/fipy
> ---
> To unsubscribe from this group and stop receiving emails from it, send an email to fipy+uns...@list.nist.gov.



--
Daniel Wheeler

Emanuele Di Palma

unread,
Oct 21, 2021, 10:19:09 AM10/21/21
to Daniel Wheeler, fipy
Dear Daniel,
thanks a lot for your answer;

First of all I'm clarifying that the terms in bracket are third order;
following your suggestions I tried to modify the equation in two ways as reported in the attached file with the preliminary fipy commands;
it's the first time that I'm using fipy, please, let me know if the commands I used make sens and I can go ahead.

Thanks a lot for your help.

Best Regards,
Emanuele


Test.pdf

Daniel Wheeler

unread,
Oct 21, 2021, 1:49:11 PM10/21/21
to Emanuele Di Palma, fipy
Hi Emanuele,

The fact that the terms in the brackets are third order changes
things. The terms in the brackets will need to be convection terms. I
can help you more with this in a few weeks. In the meantime can you
provide the boundary conditions and possible parameter values as well.
How the equations are discretized will depend on the various signs of
the terms. Also, possible values for phi (e.g. should it always remain
positive or between 0 and 1).

Cheers,

Daniel

On Thu, Oct 21, 2021 at 10:19 AM Emanuele Di Palma
--
Daniel Wheeler

Emanuele Di Palma

unread,
Oct 22, 2021, 4:11:03 AM10/22/21
to Daniel Wheeler, fipy
Hi Daniel,

 thanks a lot for your message.

Regarding the coefficients we have \alpha=1 and \gamma=0.0188, Neumann type must be the boundary condition.
\alpha represents the normalized scalar potential and it can oscillate from negative to positive values, the initial condition could be:
\alpha(t=0)=\phi_0+random_perturbation wiht \phi_0 around 10^-2 and   0<D_t(\phi)(0)<<1.

Thanks a lot for your availability.

Best Regards,
Emanuele
 

Daniel Wheeler

unread,
Nov 29, 2021, 5:18:08 PM11/29/21
to Emanuele Di Palma, fipy
Hi Emanuele,

Sorry for taking so long to respond to this. I used what you did with
the first set of equations and rearranged some more to something that
I think is tractable in FiPy (unless I messed up, please check). See
the attached PDF. If that is correct, then I think that form as
written is tractable in FiPy. Every term is either a TransientTerm or
a DiffusionTerm (the first equation is just a source on the right hand
side, which should probably be explicit). Also, all the equations are
transient as written which gives more control over the stability. I
would imagine that with smaller alphas that the system is more stable.
I would start with a very small alpha and see how stability is
impacted as you move towards the physical value of alpha (make sure
the equations solve with alpha=0 to start).

In your attached PDF in the previous email you have coefficients
multiplying diffusion terms. That does not work in FiPy. Everything
needs to be inside the operator. Hence how I wrote the equations.

Try and implement this in FiPy and the I'll take another look if you
can't get things working.

Cheers,

Daniel

On Fri, Oct 22, 2021 at 4:11 AM Emanuele Di Palma
--
Daniel Wheeler
CodeCogsEqn.pdf
Reply all
Reply to author
Forward
0 new messages