# Hydrodynamic Stability Implementation in FreeFEM

**URL:** <https://community.freefem.org/t/hydrodynamic-stability-implementation-in-freefem/622>\
**Category:** General Discussion\
**Created:** [October 20, 2020, 12:24pm UTC](https://community.freefem.org/t/hydrodynamic-stability-implementation-in-freefem/622 "2020-10-20T12:24:17Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![D\_N\_Sarkar](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@D\_N\_Sarkar](https://community.freefem.org/u/D_N_Sarkar)\
**Post date:** [July 17, 2021, 5:24pm UTC](https://community.freefem.org/t/hydrodynamic-stability-implementation-in-freefem/622/26 "2021-07-17T17:24:51Z")

</div>

**(i) Doubt-1: Paraview Visualization**  
At the end of the code: [FreeFem-sources/navier-stokes-2d-PETSc.edp at develop · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/develop/examples/hpddm/navier-stokes-2d-PETSc.edp), I added the following lines:

load “iovtk”  
int[int] Order = [1]; //Order = [2];…Does NOT work in Paraview  
string DataName = “uc”;  
savevtk(“uc.vtu”, Th, uc1, uc2, pc, dataname=DataName, order=Order);

I checked that “Order = [2]” does not work for Paraview. Only load “int[int] Order = [1]” works for Paraview.

So, using “int[int] Order = [1]”, when I run the code on Win10 (V4.9) using FreeFem+±mpi.exe, the following files are written: uc.pvd and uc\_0000.vtu. When the “uc\_0000.vtu” is opened in Paraview, I am only getting x-component of velocity (i.e., uc1). I am not seeing the other variables: uc2 and pc. **How to see all the variables (uc1, uc2 and pc) in paraview so that vector plot can be generated?**

**(ii) Doubt-2:** The codes [FreeFem-sources/navier-stokes-2d-PETSc.edp at develop · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/develop/examples/hpddm/navier-stokes-2d-PETSc.edp) and [FreeFem-sources/navier-stokes-2d-SLEPc-complex.edp at develop · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/develop/examples/hpddm/navier-stokes-2d-SLEPc-complex.edp) can be run using “FreeFem+±mpi.exe” and “mpiexec.exe”. When running the above two codes using “mpiexec.exe”, the following black lines are coming as follows:

 ![mpiexecExe_BaseFlow](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/b590588ed25c706ddea21fca522de9cb7b0204b5.jpeg)  
 ![mpiexecExe_LeadEigen](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/8dda8b1f23f60f6bc43ee8c3947e2ee3e46d5386.jpeg)  
When running the code using “FreeFem+±mpi.exe”, the black lines are not present.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [July 17, 2021, 5:27pm UTC](https://community.freefem.org/t/hydrodynamic-stability-implementation-in-freefem/622/27 "2021-07-17T17:27:35Z")

</div>

You need to write `[uc1, uc2, pc]`, not `uc1, uc2, pc`. If you don’t need any lines, it means that there is no domain decomposition, i.e., you are running your code on a single process, double check by adding `cout << mpisize << endl;` in your script.

---

<div class="post-metadata">

**Author:** ![D\_N\_Sarkar](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@D\_N\_Sarkar](https://community.freefem.org/u/D_N_Sarkar)\
**Post date:** [July 18, 2021, 9:35am UTC](https://community.freefem.org/t/hydrodynamic-stability-implementation-in-freefem/622/28 "2021-07-18T09:35:15Z")

</div>

I am trying to run the code: [FreeFem-sources/natural-convection-fieldsplit-2d-PETSc.edp at develop · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/develop/examples/hpddm/natural-convection-fieldsplit-2d-PETSc.edp), but the following error is coming:  
 ![NC_Error](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/a313511e72856a00ebb89209874565b1aba1135c.jpeg)

[Previous page](https://community.freefem.org/t/hydrodynamic-stability-implementation-in-freefem/622.md?page=1)
