# General Discussion

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

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

**Page:** 23

---

## [Need some help to build variation formula for adjacent elements](https://community.freefem.org/t/need-some-help-to-build-variation-formula-for-adjacent-elements/3023)

<div class="topic-metadata">

**Author:** [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Replies:** 5\
**Last updated:** [March 11, 2024, 2:58pm UTC](https://community.freefem.org/t/need-some-help-to-build-variation-formula-for-adjacent-elements/3023 "2024-03-11T14:58:41Z")

</div>

Dear Freefem team I was wondering if you could give me some guidance to build the second terms of this variation formula. The first term is pretty straight forward. however , the second term need find all the adjac…

---

## [Problem with adaptmesh and periodic boundary condition](https://community.freefem.org/t/problem-with-adaptmesh-and-periodic-boundary-condition/1337)

<div class="topic-metadata">

**Author:** [@UgisL](https://community.freefem.org/u/UgisL)\
**Replies:** 9\
**Last updated:** [March 9, 2024, 7:05pm UTC](https://community.freefem.org/t/problem-with-adaptmesh-and-periodic-boundary-condition/1337 "2024-03-09T19:05:11Z")

</div>

Hi everyone, I have run into an issue, which I am not sure how to solve myself. I am solving multiphase (Navier-Stokes + phase-field) equations and marching in time. I use “adaptmesh” function to tailor my FE mesh to th…

---

## [Structured mesh from keyword triangulate](https://community.freefem.org/t/structured-mesh-from-keyword-triangulate/3020)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 1\
**Last updated:** [March 8, 2024, 5:37pm UTC](https://community.freefem.org/t/structured-mesh-from-keyword-triangulate/3020 "2024-03-08T17:37:25Z")

</div>

Hi, me again. I’m using the triangulate function to generate a mesh from a set of points, but the mesh that this function returns has its elements with a huge difference between hmax and hmin, for example: Is there …

---

## [Zero solution by solving the Laplace problem on part of the mes](https://community.freefem.org/t/zero-solution-by-solving-the-laplace-problem-on-part-of-the-mes/3018)

<div class="topic-metadata">

**Author:** [@Anis](https://community.freefem.org/u/Anis)\
**Replies:** 23\
**Last updated:** [March 8, 2024, 2:31pm UTC](https://community.freefem.org/t/zero-solution-by-solving-the-laplace-problem-on-part-of-the-mes/3018 "2024-03-08T14:31:24Z")

</div>

Hello everyone, I wanted to solve the Laplace problem on part of the mesh domain. After defining the region that interests me, the problem does not resolve. \<\<catch an erreur in solve =\> set sol = 0 !!! \>\> load “m…

---

## [Slow MUMPS on 3D thermal parallel problem](https://community.freefem.org/t/slow-mumps-on-3d-thermal-parallel-problem/3014)

<div class="topic-metadata">

**Author:** [@Timothee99](https://community.freefem.org/u/Timothee99)\
**Replies:** 8\
**Last updated:** [March 7, 2024, 12:58pm UTC](https://community.freefem.org/t/slow-mumps-on-3d-thermal-parallel-problem/3014 "2024-03-07T12:58:22Z")

</div>

Hello, I am writing to you because I encounter some problems using MUMPS for 3D simulations. The calculations themselves are fine but increasing the number of processors to solve my problem does not speed-up the solving…

---

## [Write array file fails when running a parallel pool of FreeFEM processes](https://community.freefem.org/t/write-array-file-fails-when-running-a-parallel-pool-of-freefem-processes/3015)

<div class="topic-metadata">

**Author:** [@ffeppon](https://community.freefem.org/u/ffeppon)\
**Replies:** 0\
**Last updated:** [March 6, 2024, 3:37pm UTC](https://community.freefem.org/t/write-array-file-fails-when-running-a-parallel-pool-of-freefem-processes/3015 "2024-03-06T15:37:24Z")

</div>

Dear community, I noticed a weird bug when trying to export arrays to files when running several FreeFem++ processes with a Python parallel for loop. The bug seems to be related to the interpretation of macros imported …

---

## [Code fails when mesh adaptation is incorperated into a code formulated with the 'varf' keyword](https://community.freefem.org/t/code-fails-when-mesh-adaptation-is-incorperated-into-a-code-formulated-with-the-varf-keyword/3000)

<div class="topic-metadata">

**Author:** [@jna1g18](https://community.freefem.org/u/jna1g18)\
**Replies:** 15\
**Last updated:** [March 5, 2024, 4:39pm UTC](https://community.freefem.org/t/code-fails-when-mesh-adaptation-is-incorperated-into-a-code-formulated-with-the-varf-keyword/3000 "2024-03-05T16:39:29Z")

</div>

Hi all, I’m currently trying to solve a toy problem using the varf keyword. So far, I have been able to solve the problem without mesh adaptation using both the problem keyword and varf keyword, and I have also been able…

---

## [Building a mesh from meshL and mesh](https://community.freefem.org/t/building-a-mesh-from-meshl-and-mesh/3011)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 4\
**Last updated:** [March 5, 2024, 10:00am UTC](https://community.freefem.org/t/building-a-mesh-from-meshl-and-mesh/3011 "2024-03-05T10:00:26Z")

</div>

Hi guys, I was wondering if it’s possible to create a mesh combining meshL and normal mesh or if there’s a way to make these two meshes compatible. For exemple, say I have a triangle meshL would be the mesh over the e…

---

## [Error between numerical solutions](https://community.freefem.org/t/error-between-numerical-solutions/3005)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 4\
**Last updated:** [February 29, 2024, 1:40pm UTC](https://community.freefem.org/t/error-between-numerical-solutions/3005 "2024-02-29T13:40:07Z")

</div>

Hey guys, is it possible to compute the error between two numerical solutions in freefem? Say I have a problem without an exact solution, but I can do a reference one using a refined mesh, can a compute the error (L2, …

---

## [Mesh cube with spherical hole](https://community.freefem.org/t/mesh-cube-with-spherical-hole/2999)

<div class="topic-metadata">

**Author:** [@smyrback](https://community.freefem.org/u/smyrback)\
**Replies:** 3\
**Last updated:** [February 27, 2024, 3:54pm UTC](https://community.freefem.org/t/mesh-cube-with-spherical-hole/2999 "2024-02-27T15:54:36Z")

</div>

Hi, I’ve been looking at the example of generating a cube with a sphere inside from here: Mesh Generation. The code is: " load “msh3” load “TetGen” load “medit” include “MeshSurface.idp” // Parameters real hs =…

---

## [Integral from (0,0) to (x,y)](https://community.freefem.org/t/integral-from-0-0-to-x-y/2998)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [February 25, 2024, 2:31pm UTC](https://community.freefem.org/t/integral-from-0-0-to-x-y/2998 "2024-02-25T14:31:13Z")

</div>

I wanted to implement some of the integral solutions shown here, in particular the non-homogeneous Dirichlet integral, https://en.wikipedia.org/wiki/Heat\_equation Is there some way to do that with int2d? I guess I co…

---

## [Store a complex matrices in .dat file](https://community.freefem.org/t/store-a-complex-matrices-in-dat-file/2997)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 0\
**Last updated:** [February 25, 2024, 10:24am UTC](https://community.freefem.org/t/store-a-complex-matrices-in-dat-file/2997 "2024-02-25T10:24:59Z")

</div>

I found out that writing a matrix in .dat file is efficient than writing in .csv file. Is there a way to store the real and imaginary part of a matrix in different files which will make their manipulation in matlab ef…

---

## [Getting flipped eigen values](https://community.freefem.org/t/getting-flipped-eigen-values/2994)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 1\
**Last updated:** [February 25, 2024, 8:50am UTC](https://community.freefem.org/t/getting-flipped-eigen-values/2994 "2024-02-25T08:50:23Z")

</div>

when i tried for the simpler case of plane Poiseuille flow stability with Alpha=0,beta=1; instead of getting this eigen spectrum: i am getting this: That is real and imaginary parts are flipped. what can be the …

---

## [Unexpected values by int1d depending on datatype of a scalar multiplier](https://community.freefem.org/t/unexpected-values-by-int1d-depending-on-datatype-of-a-scalar-multiplier/2992)

<div class="topic-metadata">

**Author:** [@markus](https://community.freefem.org/u/markus)\
**Replies:** 4\
**Last updated:** [February 25, 2024, 5:54am UTC](https://community.freefem.org/t/unexpected-values-by-int1d-depending-on-datatype-of-a-scalar-multiplier/2992 "2024-02-25T05:54:38Z")

</div>

Dear community I am really at a loss concerning the behavior of int1d when applying a scalar multiplier to the integral. I was comparing two models in 2d linear elasticity which where mathematically supposed to yield t…

---

## [Local hydrodynamic stability problem](https://community.freefem.org/t/local-hydrodynamic-stability-problem/2990)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 0\
**Last updated:** [February 23, 2024, 12:59pm UTC](https://community.freefem.org/t/local-hydrodynamic-stability-problem/2990 "2024-02-23T12:59:21Z")

</div>

I am trying to solve for local hydrodynamic stability for plane poiseuille flow (incompressible and viscous) I tried using meshL to create 1d domain but the A branch of the eigenvalue spectrum is not matching with the s…

---

## [Help with creating a baffle](https://community.freefem.org/t/help-with-creating-a-baffle/2981)

<div class="topic-metadata">

**Author:** [@RNlao](https://community.freefem.org/u/RNlao)\
**Replies:** 4\
**Last updated:** [February 23, 2024, 3:21am UTC](https://community.freefem.org/t/help-with-creating-a-baffle/2981 "2024-02-23T03:21:49Z")

</div>

I want to introduce a flat plate without thickness into a grid, essentially means inserting a line or surface that fluid cannot cross.This is akin to defining a boundary condition. The sketch is below. The red line is…

---

## [Solve Navier stokes equation on very large domains such as patient specific aorta](https://community.freefem.org/t/solve-navier-stokes-equation-on-very-large-domains-such-as-patient-specific-aorta/2988)

<div class="topic-metadata">

**Author:** [@meraj](https://community.freefem.org/u/meraj)\
**Replies:** 0\
**Last updated:** [February 23, 2024, 3:18am UTC](https://community.freefem.org/t/solve-navier-stokes-equation-on-very-large-domains-such-as-patient-specific-aorta/2988 "2024-02-23T03:18:14Z")

</div>

can we solve Navier stokes equation on very large domains such as patient specific aorta?

---

## [What are the valid operations on an fespace?](https://community.freefem.org/t/what-are-the-valid-operations-on-an-fespace/2978)

<div class="topic-metadata">

**Author:** [@glenwheeler](https://community.freefem.org/u/glenwheeler)\
**Replies:** 3\
**Last updated:** [February 23, 2024, 1:37am UTC](https://community.freefem.org/t/what-are-the-valid-operations-on-an-fespace/2978 "2024-02-23T01:37:16Z")

</div>

Hi everyone! I’m a total beginner at using FreeFEM++. I wanted to calculate the negative part of an fespace X by using max(-X, 0.0); but it didn’t work. Instead, I used a loop like this: for(int i = 0; i \< Vh.ndof; +…

---

## [Different solutions when using 'problem' and 'varf' keywords](https://community.freefem.org/t/different-solutions-when-using-problem-and-varf-keywords/2987)

<div class="topic-metadata">

**Author:** [@jna1g18](https://community.freefem.org/u/jna1g18)\
**Replies:** 3\
**Last updated:** [February 22, 2024, 7:22pm UTC](https://community.freefem.org/t/different-solutions-when-using-problem-and-varf-keywords/2987 "2024-02-22T19:22:34Z")

</div>

Hi all, I’m currently trying to understand how to properly use the varf keyword in FreeFem and I’ve come across an issue where the solution to a simple toy problem is different when the code is written using the problem …

---

## [How to save the spatial 3D mesh and numerical solution computed through FreeFem++?](https://community.freefem.org/t/how-to-save-the-spatial-3d-mesh-and-numerical-solution-computed-through-freefem/2986)

<div class="topic-metadata">

**Author:** [@yunzhangzhang](https://community.freefem.org/u/yunzhangzhang)\
**Replies:** 0\
**Last updated:** [February 22, 2024, 4:29pm UTC](https://community.freefem.org/t/how-to-save-the-spatial-3d-mesh-and-numerical-solution-computed-through-freefem/2986 "2024-02-22T16:29:08Z")

</div>

After solving a 3D spatial problem with FreeFem++, how can I save the mesh and numerical solution for easy visualization using Tecplot software? Thank you.

---

## [Change of sign in linear part of variational problem (varf vs problem)](https://community.freefem.org/t/change-of-sign-in-linear-part-of-variational-problem-varf-vs-problem/2984)

<div class="topic-metadata">

**Author:** [@markus](https://community.freefem.org/u/markus)\
**Replies:** 1\
**Last updated:** [February 22, 2024, 1:19pm UTC](https://community.freefem.org/t/change-of-sign-in-linear-part-of-variational-problem-varf-vs-problem/2984 "2024-02-22T13:19:29Z")

</div>

Hello, I am novice to FreeFem and experimenting with the abundant features. Among other things, i read that the use of varfis supposed to be faster than problem.. So I tried it out in a simple example of linear elastici…

---

## [Simple Time Domain Heat Transfer Modeling](https://community.freefem.org/t/simple-time-domain-heat-transfer-modeling/2983)

<div class="topic-metadata">

**Author:** [@MehranK1](https://community.freefem.org/u/MehranK1)\
**Replies:** 1\
**Last updated:** [February 22, 2024, 9:07am UTC](https://community.freefem.org/t/simple-time-domain-heat-transfer-modeling/2983 "2024-02-22T09:07:11Z")

</div>

Hello Everyone, I am trying to model a very simple copper bar the has temperature difference between its both vertical sides. Here is the code. I dont know what is wrong that it gives me an error. I would appreciate it …

---

## [How to solve the following problem?](https://community.freefem.org/t/how-to-solve-the-following-problem/2979)

<div class="topic-metadata">

**Author:** [@ksugahar](https://community.freefem.org/u/ksugahar)\
**Replies:** 2\
**Last updated:** [February 20, 2024, 3:25pm UTC](https://community.freefem.org/t/how-to-solve-the-following-problem/2979 "2024-02-20T15:25:34Z")

</div>

I want to solve the following problem with FreeFEM++. {\\rm given }{\\bf \\vec B}{\\rm (}{\\bf \\vec r}){\\rm :such }\\vec \\nabla \\cdot {\\bf \\vec B} = 0 \\\\ {\\rm find }F{\\rm (}{\\bf \\vec r}),G{\\rm (}{\\bf \\vec r}):{\\rm such }\\…

---

## [Plot 1d eigenvector](https://community.freefem.org/t/plot-1d-eigenvector/2975)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 0\
**Last updated:** [February 19, 2024, 6:39am UTC](https://community.freefem.org/t/plot-1d-eigenvector/2975 "2024-02-19T06:39:27Z")

</div>

I want to plot 1d eigenvector obtained by solving the following problem in MATLAB using eigs matrix \<complex\> A; matrix \<complex\> B; //LHS varf a11(\[u,v,w,p\],\[a1,a2,a3,a4\])…

---

## [Help with Building Block Matrix](https://community.freefem.org/t/help-with-building-block-matrix/2970)

<div class="topic-metadata">

**Author:** [@FluidMan](https://community.freefem.org/u/FluidMan)\
**Replies:** 4\
**Last updated:** [February 17, 2024, 3:41pm UTC](https://community.freefem.org/t/help-with-building-block-matrix/2970 "2024-02-17T15:41:35Z")

</div>

Hi everyone, I’m currently working on finding a solution to Stokes flow within a square domain. Here’s a brief overview of the problem: Domain Shape: Square-like, with the top and bottom boundaries representing no-pene…

---

## [Scatter Plot directly on freefem?](https://community.freefem.org/t/scatter-plot-directly-on-freefem/2962)

<div class="topic-metadata">

**Author:** [@brrrr](https://community.freefem.org/u/brrrr)\
**Replies:** 2\
**Last updated:** [February 13, 2024, 7:43am UTC](https://community.freefem.org/t/scatter-plot-directly-on-freefem/2962 "2024-02-13T07:43:54Z")

</div>

Good evening, I would like to do a simple scatter plot from values I calculated thanks to freefem++. the plot fonction doesn’t seem to work … I tried to use it like this : plot(\[value00,value01…\],\[value10,value11…\])…

---

## [Why is my code note working ?( simple code)](https://community.freefem.org/t/why-is-my-code-note-working-simple-code/2961)

<div class="topic-metadata">

**Author:** [@brrrr](https://community.freefem.org/u/brrrr)\
**Replies:** 1\
**Last updated:** [February 12, 2024, 8:56am UTC](https://community.freefem.org/t/why-is-my-code-note-working-simple-code/2961 "2024-02-12T08:56:07Z")

</div>

Good eveneing everyone , I am a begginer on freemfem++. My programm doesnt compile and i just cant understand why. The problems seems to be due to the int2d function. Thank you for your help! Error message : "int2d(Vh) …

---

## [How to read .mesh file in matlab](https://community.freefem.org/t/how-to-read-mesh-file-in-matlab/2959)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 0\
**Last updated:** [February 11, 2024, 12:47pm UTC](https://community.freefem.org/t/how-to-read-mesh-file-in-matlab/2959 "2024-02-11T12:47:29Z")

</div>

How to read “.mesh” file in MATLAB? ffreadmesh is not working.

---

## [Solving diffusion equation on mesh with multiple sub-regions](https://community.freefem.org/t/solving-diffusion-equation-on-mesh-with-multiple-sub-regions/2954)

<div class="topic-metadata">

**Author:** [@vasilvas](https://community.freefem.org/u/vasilvas)\
**Replies:** 6\
**Last updated:** [February 10, 2024, 10:18pm UTC](https://community.freefem.org/t/solving-diffusion-equation-on-mesh-with-multiple-sub-regions/2954 "2024-02-10T22:18:08Z")

</div>

Greetings FreeFem community, I am quite new to FreeFem/mmg tools and I’m trying to set-up a diffusion equation on a mesh with multiple regions (generated via supplying a level-set function to mmg2d) What I want to do i…

---

## [I want to simulate triboelectric generator](https://community.freefem.org/t/i-want-to-simulate-triboelectric-generator/2934)

<div class="topic-metadata">

**Author:** [@curiousguy](https://community.freefem.org/u/curiousguy)\
**Replies:** 4\
**Last updated:** [February 10, 2024, 11:38am UTC](https://community.freefem.org/t/i-want-to-simulate-triboelectric-generator/2934 "2024-02-10T11:38:42Z")

</div>

Triboelectric (nano-) generators basically involves electrostatic charging between two surfaces, and as these charged surfaces move they induce a potential on the electrode, that causes current to flow. Here is one artic…

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

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