Need help regarding simulation

I want to get following types of figure of Cahn-Hilliard equation.


Can you help me please how to do this kind of things using freefem++. I am facing problem regarding this.
I wan to such type of computations. I need some demo examples so that i can understand how i can create this. Please help if anyone know.

Go through the example of Laplace equation and try to replace the Laplace equation with the weak formulation of your PDE. Then you can export the solution to paraview vtk file and use paraview for generating figures like that.

I recommend checking out the examples and Videos by TuxRider for FreeFEM. They would be helpful and teach you all the necessary stuff to use FreeFEM

1 Like

Thanks for your reply. Can you share some demo example or tutorial for this things.

Heat-EI.edp (1.7 KB)
I am getting the Vtk File. What to do next??. Please tell brother how i can see such figure that i want?

Import the iovtk library.

load "iovtk" //place this in the start of the code

savevtk("output.vtu", Th, u1,u2, p, dataname="U V P", order=[1,1,1]); 
//place this after the problem is solved and you have solution.

This will output a paraview readable file which you can load in Paraview and generated images like that. Paraview is recommended for better images otherwise you can simply plot the solution and save it.

If you are not aware about Paraview. It is a post-processing tool. Tux-riders channel has a series of tutorial on that too.

1 Like

But I see TuxRider doing everything in Python and Linux. I am using Windows10.

The code remains same whether you use FreeFEM on windows or linux. It doesn’t change.
In windows also you can use the same command to run the code through CMD.

FreeFem++ foo.edp
Refer to these videos:

1 Like

Thank you so much brother. I will see. Many many thanks.

1 Like