# General Discussion

**URL:** https://community.freefem.org/c/general-discussion/7.md?page=64

[Latest](https://community.freefem.org/latest.md) · [Categories](https://community.freefem.org/categories.md)

**Page:** 65

---

## [Visualise the normal vector](https://community.freefem.org/t/visualise-the-normal-vector/779)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 10:20pm UTC](https://community.freefem.org/t/visualise-the-normal-vector/779 "2021-02-03T22:20:00Z")

</div>

Please can someone let me know how to visualise the normal vector at the boundary (or an interior interface) of a domain? Thanks in advance! YX

---

## [Get nodes of a mesh](https://community.freefem.org/t/get-nodes-of-a-mesh/778)

<div class="topic-metadata">

**Author:** [@e-aranda](https://community.freefem.org/u/e-aranda)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 2:46pm UTC](https://community.freefem.org/t/get-nodes-of-a-mesh/778 "2021-01-31T14:46:50Z")

</div>

Hello!, for a given node in a mesh, is there a way to get all nodes sharing an element with? Maybe is there an internal method of Mesh? Thanks, Ernesto

---

## [Freefem language](https://community.freefem.org/t/freefem-language/780)

<div class="topic-metadata">

**Author:** [@mrbenson](https://community.freefem.org/u/mrbenson)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 2:39pm UTC](https://community.freefem.org/t/freefem-language/780 "2021-01-31T14:39:18Z")

</div>

Hello, I have a very simple question related to the freefem language. I have many (up to 1000) thermal conductivities for each region, i’d like to still use in the weak form the following expression int2d(Th)(lambda …

---

## [Problem with periodic bc](https://community.freefem.org/t/problem-with-periodic-bc/772)

<div class="topic-metadata">

**Author:** [@chaimaa](https://community.freefem.org/u/chaimaa)\
**Replies:** 4\
**Last updated:** [January 31, 2021, 2:25pm UTC](https://community.freefem.org/t/problem-with-periodic-bc/772 "2021-01-31T14:25:29Z")

</div>

hi, when i run this script : load “msh3” load “medit” load “UMFPACK64” load “iovtk” load"gmsh" lockOrientation = false; // Global parameters //verbosity = 0; real cpu=clock(); int N=1; mesh3 Th=gmshload3(“CC\_…

---

## [Define a variable point by point](https://community.freefem.org/t/define-a-variable-point-by-point/764)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 4\
**Last updated:** [January 30, 2021, 10:40pm UTC](https://community.freefem.org/t/define-a-variable-point-by-point/764 "2021-01-30T22:40:27Z")

</div>

Hi, Can someone please help me figure this out: say fespace Vh(th,P1); Vh f=0; Can I define f at given vertices, such as (x0, y0) which is the coordinate of a vertex. I tried f(x0,y0)=2\*x0+y0, which was illegal. …

---

## [N.x No operator .x for type \<Pl\>](https://community.freefem.org/t/n-x-no-operator-x-for-type-pl/769)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 1\
**Last updated:** [January 28, 2021, 4:52pm UTC](https://community.freefem.org/t/n-x-no-operator-x-for-type-pl/769 "2021-01-28T16:52:24Z")

</div>

Can someone help me look at the following error. I have a boundary integral: +int1d(th,5)(-(N.x\*lx-N.y\*ly)\*uh-(N.y\*lx+N.x\*ly)\*vh) where (lx, ly) is a local force, and I want to transform it to the global coordinate sy…

---

## [MESH OF (GMSH and SLICER)](https://community.freefem.org/t/mesh-of-gmsh-and-slicer/757)

<div class="topic-metadata">

**Author:** [@Pitagoras1](https://community.freefem.org/u/Pitagoras1)\
**Replies:** 2\
**Last updated:** [January 27, 2021, 4:34pm UTC](https://community.freefem.org/t/mesh-of-gmsh-and-slicer/757 "2021-01-27T16:34:29Z")

</div>

Hi, I have a question, and I am very grateful if anyone can help me … How to read in Freefem ++ a mesh brought from SLICER-3D to gmsh? When I created the segmentation of an image using the 3D slicer, I generated a Vtk…

---

## [Neumann boundary -- local or glocal](https://community.freefem.org/t/neumann-boundary-local-or-glocal/766)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 0\
**Last updated:** [January 26, 2021, 9:09pm UTC](https://community.freefem.org/t/neumann-boundary-local-or-glocal/766 "2021-01-26T21:09:07Z")

</div>

solve Elasticity(\[u, v\], \[uh, vh\]) = int2d(th)( …) +int1d(fxuh + fyvh) Does (fx, fy) have the meaning of a global force – defined in global system?

---

## [Mixed FEM - numeration](https://community.freefem.org/t/mixed-fem-numeration/739)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 3\
**Last updated:** [January 26, 2021, 7:28pm UTC](https://community.freefem.org/t/mixed-fem-numeration/739 "2021-01-26T19:28:55Z")

</div>

Dear FreeFEM users, For a mixed element, such as P2/P1 element for velocity (in space Vh) and pressure (in space Ph) pair. If I loop for (i=0; i\<Vh.ndof; i++), how can I know which DOF includes pressure and which one…

---

## [ALE method for oscillating cylinder](https://community.freefem.org/t/ale-method-for-oscillating-cylinder/762)

<div class="topic-metadata">

**Author:** [@tundo](https://community.freefem.org/u/tundo)\
**Replies:** 0\
**Last updated:** [January 26, 2021, 5:55pm UTC](https://community.freefem.org/t/ale-method-for-oscillating-cylinder/762 "2021-01-26T17:55:57Z")

</div>

Good evening everyone, this is the code I wrote to study a cylinder that oscillates with an imposed motion in a direction perpendicular to the asymptotic flow. I have developed an ALE method. I put a dimensionless ampli…

---

## [Reynolds doesn't have an impact on the simulation](https://community.freefem.org/t/reynolds-doesnt-have-an-impact-on-the-simulation/755)

<div class="topic-metadata">

**Author:** [@LeonardoDipilato](https://community.freefem.org/u/LeonardoDipilato)\
**Replies:** 12\
**Last updated:** [January 25, 2021, 9:52pm UTC](https://community.freefem.org/t/reynolds-doesnt-have-an-impact-on-the-simulation/755 "2021-01-25T21:52:27Z")

</div>

I’m trying to solve the following equation (incompressible NS) over a 2D domain (Tesla Valve): S(u) = (grad(u) + grad(u)’)/2 is the symmetric part of the gradient of u, with ’ being the transpose operator. I’m forcin…

---

## [Nan value of the 3D homogeneous matrix](https://community.freefem.org/t/nan-value-of-the-3d-homogeneous-matrix/758)

<div class="topic-metadata">

**Author:** [@chaimaa](https://community.freefem.org/u/chaimaa)\
**Replies:** 0\
**Last updated:** [January 25, 2021, 12:56pm UTC](https://community.freefem.org/t/nan-value-of-the-3d-homogeneous-matrix/758 "2021-01-25T12:56:41Z")

</div>

Hi, I try to calculate the homogeneous matrix of an effective property. unfortunately, I receive this erreor : could you help me please and what is the meaning of the nan value ?

---

## [Periodic mesh in gmsh](https://community.freefem.org/t/periodic-mesh-in-gmsh/754)

<div class="topic-metadata">

**Author:** [@chaimaa](https://community.freefem.org/u/chaimaa)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 7:44am UTC](https://community.freefem.org/t/periodic-mesh-in-gmsh/754 "2021-01-23T07:44:22Z")

</div>

Hi, I create the geometry file .stp by using CATIA and i import it to gmsh. when i set the function periodic surface in order to have similar meshes : boundS13\[\] = Boundary{Surface {13};}; boundS17\[\] = Boundary{Surfa…

---

## [Load PETSc error with FreeFem++](https://community.freefem.org/t/load-petsc-error-with-freefem/747)

<div class="topic-metadata">

**Author:** [@Tim](https://community.freefem.org/u/Tim)\
**Replies:** 2\
**Last updated:** [January 20, 2021, 3:08am UTC](https://community.freefem.org/t/load-petsc-error-with-freefem/747 "2021-01-20T03:08:14Z")

</div>

Dear all, I am trying for the first time to use FreeFem++, I installed it and it seems to work. However, I tried to work on some examples using PETSc, I installed it and I get always the same error despite reinstalling…

---

## [Define an interval with FF++](https://community.freefem.org/t/define-an-interval-with-ff/750)

<div class="topic-metadata">

**Author:** [@Aicha](https://community.freefem.org/u/Aicha)\
**Replies:** 3\
**Last updated:** [January 17, 2021, 8:02pm UTC](https://community.freefem.org/t/define-an-interval-with-ff/750 "2021-01-17T20:02:36Z")

</div>

Hi, we defin the interval \[0,1\] by //Mesh real a=0., b=1.; mesh Th=square(Nx,1,\[a+x\*(b-a),y\*b/Nx\]); fespace Vh(Th,P2); My question is how we can define the interval \[0,2\]? Regards

---

## [Implementation of Optimality condition](https://community.freefem.org/t/implementation-of-optimality-condition/748)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 2\
**Last updated:** [January 17, 2021, 6:06am UTC](https://community.freefem.org/t/implementation-of-optimality-condition/748 "2021-01-17T06:06:47Z")

</div>

Dear Sir/Madam I have problem with implementation of an equation in the code. I have a relation as follow: ∇𝒥=−(𝑑𝑢/𝑑𝑛)+𝛼𝐹 on inlet where u is obtained in the former step and is known and F is known also. to reach th…

---

## [Trying to plot multiple graphs](https://community.freefem.org/t/trying-to-plot-multiple-graphs/746)

<div class="topic-metadata">

**Author:** [@dajopez](https://community.freefem.org/u/dajopez)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 8:28am UTC](https://community.freefem.org/t/trying-to-plot-multiple-graphs/746 "2021-01-15T08:28:49Z")

</div>

Hello, I am solving an eigenvalue problem so a bunch of functions are being generated. What is the best way to do this? Can I just save each plot to a separate file using cout or should I save the function values into d…

---

## [Save VTK file mesh file with elements adjacency](https://community.freefem.org/t/save-vtk-file-mesh-file-with-elements-adjacency/743)

<div class="topic-metadata">

**Author:** [@quang-ha](https://community.freefem.org/u/quang-ha)\
**Replies:** 0\
**Last updated:** [January 12, 2021, 5:08pm UTC](https://community.freefem.org/t/save-vtk-file-mesh-file-with-elements-adjacency/743 "2021-01-12T17:08:18Z")

</div>

I am currently using FreeFem++ to generate a VTK mesh, i.e.: load “msh3” load “iovtk” int n=6; mesh3 Th1 = cube(n, n, n); savevtk(“cube-DG-mesh.vtk”, Th1); Is there anyway for FreeFEM to generate the adjacency of ele…

---

## [Forcing pressure values on inlet and outlet](https://community.freefem.org/t/forcing-pressure-values-on-inlet-and-outlet/741)

<div class="topic-metadata">

**Author:** [@LeonardoDipilato](https://community.freefem.org/u/LeonardoDipilato)\
**Replies:** 4\
**Last updated:** [January 12, 2021, 10:51am UTC](https://community.freefem.org/t/forcing-pressure-values-on-inlet-and-outlet/741 "2021-01-12T10:51:23Z")

</div>

I’m trying to solve a problem of a microfluidic flow inside a valve given pressure at the inlet and the outlet. My governing equation is Re(u\*grad(u))+grad( p )-lapl(u) = 0, where Re is Reynolds number, \* is the dot pro…

---

## [Two Different PDE solvers give different answers](https://community.freefem.org/t/two-different-pde-solvers-give-different-answers/674)

<div class="topic-metadata">

**Author:** [@dajopez](https://community.freefem.org/u/dajopez)\
**Replies:** 17\
**Last updated:** [January 12, 2021, 6:36am UTC](https://community.freefem.org/t/two-different-pde-solvers-give-different-answers/674 "2021-01-12T06:36:11Z")

</div>

Hello, I am trying to switch my code to parallel, but the new solver I use gives out wrong data. I know its wrong because it doesnt line up with analytical results. Here is the correct implementation: // Problem // OP =…

---

## [Basic Syntax question](https://community.freefem.org/t/basic-syntax-question/740)

<div class="topic-metadata">

**Author:** [@dajopez](https://community.freefem.org/u/dajopez)\
**Replies:** 2\
**Last updated:** [January 12, 2021, 12:19am UTC](https://community.freefem.org/t/basic-syntax-question/740 "2021-01-12T00:19:01Z")

</div>

How do I do boundary conditions where the normal derivative is set to 0 when solving differential equations? Thank you for your help.

---

## [Problem when increasing the number of procs](https://community.freefem.org/t/problem-when-increasing-the-number-of-procs/734)

<div class="topic-metadata">

**Author:** [@LucasPa](https://community.freefem.org/u/LucasPa)\
**Replies:** 7\
**Last updated:** [January 11, 2021, 8:33am UTC](https://community.freefem.org/t/problem-when-increasing-the-number-of-procs/734 "2021-01-11T08:33:27Z")

</div>

Hi, Thanks to the nice tutorial held in December, I am now able to run parallel computation with FreeFem. However, I can only do so up to 7 processors. If I go beyond 7 processors, FreeFem gets stuck when running “Creat…

---

## [Modifying velocity at boundary](https://community.freefem.org/t/modifying-velocity-at-boundary/737)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 0\
**Last updated:** [January 8, 2021, 4:30pm UTC](https://community.freefem.org/t/modifying-velocity-at-boundary/737 "2021-01-08T16:30:48Z")

</div>

Dear Users I am doing a boundary optimal control by setting inlet velocity as the control. my equations are based on solving state and adjoint equations (optimality system). my optimality condition is defined as follow …

---

## [Interpolation matrix between two meshes](https://community.freefem.org/t/interpolation-matrix-between-two-meshes/735)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 0\
**Last updated:** [January 8, 2021, 9:04am UTC](https://community.freefem.org/t/interpolation-matrix-between-two-meshes/735 "2021-01-08T09:04:32Z")

</div>

Hi, Can some explain the following piece of code (two questions below), which is from https://link.springer.com/chapter/10.1007/978-3-319-94676-4\_5 fespace Vh(Thf, P1b); // velocity space fespace Qh(Thf, P1); // pre…

---

## [Computing flow through a line](https://community.freefem.org/t/computing-flow-through-a-line/733)

<div class="topic-metadata">

**Author:** [@LeonardoDipilato](https://community.freefem.org/u/LeonardoDipilato)\
**Replies:** 6\
**Last updated:** [January 7, 2021, 5:16pm UTC](https://community.freefem.org/t/computing-flow-through-a-line/733 "2021-01-07T17:16:16Z")

</div>

Is there any way to measure the flow through an arbitrary line? My domain is a duct with one inlet, which then separates into two channels which later merge together and go to the outlet. Is there any way to find out th…

---

## [Periodic boundary about taylor problem](https://community.freefem.org/t/periodic-boundary-about-taylor-problem/553)

<div class="topic-metadata">

**Author:** [@xlzheng](https://community.freefem.org/u/xlzheng)\
**Replies:** 1\
**Last updated:** [January 6, 2021, 2:37pm UTC](https://community.freefem.org/t/periodic-boundary-about-taylor-problem/553 "2021-01-06T14:37:05Z")

</div>

Hi, I’m trying to solve the taylor vortex problem with periodic boundary in the two-dimensional domain x,yϵ\[-1,1\]. I use the one order time precision discrete the equation, and Initialize the velocity and pressure wi…

---

## [Assigning labels to surface mesh](https://community.freefem.org/t/assigning-labels-to-surface-mesh/725)

<div class="topic-metadata">

**Author:** [@Alex](https://community.freefem.org/u/Alex)\
**Replies:** 2\
**Last updated:** [January 6, 2021, 2:28pm UTC](https://community.freefem.org/t/assigning-labels-to-surface-mesh/725 "2021-01-06T14:28:34Z")

</div>

Hello, I am trying to create a mesh on the parallelepiped (Xmin,Xmax)-by-(Ymin,Ymax)-by-(Zmin,Zmax). The mesh must be uniform in the x- and z-directions, but non-uniform in the y-direction, so I cannot use cube. My appr…

---

## [Time averaged values](https://community.freefem.org/t/time-averaged-values/724)

<div class="topic-metadata">

**Author:** [@Robert](https://community.freefem.org/u/Robert)\
**Replies:** 2\
**Last updated:** [January 4, 2021, 4:40pm UTC](https://community.freefem.org/t/time-averaged-values/724 "2021-01-04T16:40:32Z")

</div>

Hello forum, I am trying to get the mean values of an unsteady flow. So far I tried the following code: for (i=1; i\<=iterations; i++) { t +=dt; // update the time step up\[ \]=u\[ \]; // Problem variables PROBLEM; //Ca…

---

## [Issue with ghost elements](https://community.freefem.org/t/issue-with-ghost-elements/715)

<div class="topic-metadata">

**Author:** [@Mik](https://community.freefem.org/u/Mik)\
**Replies:** 6\
**Last updated:** [January 4, 2021, 2:26pm UTC](https://community.freefem.org/t/issue-with-ghost-elements/715 "2021-01-04T14:26:40Z")

</div>

Dear All, I am having an issue with the transfer of my variable from one iteration to the next while implementing a number of processes (n)\>1. My problem has the addition of material and moving heat source with each it…

---

## [Plotting magnitude of a vector](https://community.freefem.org/t/plotting-magnitude-of-a-vector/723)

<div class="topic-metadata">

**Author:** [@LeonardoDipilato](https://community.freefem.org/u/LeonardoDipilato)\
**Replies:** 2\
**Last updated:** [January 4, 2021, 10:56am UTC](https://community.freefem.org/t/plotting-magnitude-of-a-vector/723 "2021-01-04T10:56:58Z")

</div>

Given a vector \[ux, uy\] as the solution to a variational problem, is there any way to plot sqrt(ux^2+uy^2)? I can’t find anything in the documentation nor in this forum, which seems really strange compared to how common…

[Previous page](https://community.freefem.org/c/general-discussion/7.md?page=63)

[Next page](https://community.freefem.org/c/general-discussion/7.md?page=65)
