# Neumann condition

**URL:** https://community.freefem.org/t/neumann-condition/1903
**Category:** General Discussion
**Created:** [July 20, 2022, 10:18am UTC](https://community.freefem.org/t/neumann-condition/1903 "2022-07-20T10:18:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jamal](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/jamal/32/1527_2.png) [@Jamal](https://community.freefem.org/u/Jamal)
#### Post date: [July 20, 2022, 10:18am UTC](https://community.freefem.org/t/neumann-condition/1903/1 "2022-07-20T10:18:50Z")

</div>

Hello everyone.  
how to calculate the outward normal vector.  
Because I want to find the value of Neumann condition.

When I use :  
Neumann= dx(Uex)\*N.x+dy(Uex)\*N.y

I found  
Neumann=  
000000  
000000  
…  
NB: Uex is the exact solution  
Thanks.

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [July 22, 2022, 9:42am UTC](https://community.freefem.org/t/neumann-condition/1903/2 "2022-07-22T09:42:31Z")

</div>

The problem is by default N.X and N.Y is not defined correctly in general.

---

<div class="post-metadata">

### Author: ![Jamal](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/jamal/32/1527_2.png) [@Jamal](https://community.freefem.org/u/Jamal)
#### Post date: [July 22, 2022, 3:13pm UTC](https://community.freefem.org/t/neumann-condition/1903/3 "2022-07-22T15:13:46Z")

</div>

Merci cher professeur Frédéric pour votre réponse  
Donc il n’existe pas un macro qui permet de calculer la condition de Neumann.  
Cordialement.

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [July 23, 2022, 10:16am UTC](https://community.freefem.org/t/neumann-condition/1903/4 "2022-07-23T10:16:00Z")

</div>

You can lnear form to evaluate Neuman Condition on Poisson equation.

```auto

varf vNeuman(used,v) = int1d(Th)(v*(dx(Uex)*N.x+dy(Uex)*N.y)/lenEdge);
Vh vn; // Finite element function to store the Normal derivative
vn[]= vNeuman(0,Vh);

plot(vn,wait=1); 

```
