# Thin Layer Modelling

**URL:** https://community.freefem.org/t/thin-layer-modelling/2302
**Category:** General Discussion
**Created:** [March 1, 2023, 12:36pm UTC](https://community.freefem.org/t/thin-layer-modelling/2302 "2023-03-01T12:36:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alexrusu](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@alexrusu](https://community.freefem.org/u/alexrusu)
#### Post date: [March 1, 2023, 12:36pm UTC](https://community.freefem.org/t/thin-layer-modelling/2302/1 "2023-03-01T12:36:19Z")

</div>

Hi ,

I have recently started using FreeFEM for my PhD studying, but I have encountered a problem when I am trying to model very thin domains in 2D.

I am trying to define a really thin rectangular shape (length 0.2 mm and width 20 micrometer), but I constantly get the following error:

**Exec error : Error points border points to close \< diameter\*1e-7**

I am using the following code:

include “ffmatlib.idp”  
int C1=1;  
int C2=2;  
real tapeWidth=0.012;  
real thicknessAgEpoxy=20_10^-6;  
border C11(t=0., 1.){x=tapeWidth_t; y=0;label=C2;}  
border C12(t=0., 1.){x=tapeWidth; y=thicknessAgEpoxy_t;label=C2;}  
border C13(t=1., 0.){x=tapeWidth_t; y=thicknessAgEpoxy;label=C2;}  
border C14(t=1., 0.){x=0; y=thicknessAgEpoxy_t;label=C2;}  
int n=10;  
mesh Th=buildmesh(C11(15_n)+C12(1)+C13(5\*n)+C14(1));  
plot(Th);

Am I missing some definition? The algorithm works when I define higher width values, so I assume there must be a definition of the minimum clearance that I have to do, but I couldn’t find something in the documentation/forum.

Thank you!

Regards,  
Alex

---

<div class="post-metadata">

### Author: ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)
#### Post date: [March 1, 2023, 12:50pm UTC](https://community.freefem.org/t/thin-layer-modelling/2302/2 "2023-03-01T12:50:37Z")

</div>

I don’t know what you are doing but I think there is a typo,  
After fixing the copied text and making this change it creates a coarse  
mesh at both ends tapered towards the top.

```auto
    4 : real tapeWidth=0.012;
    5 : //real thicknessAgEpoxy=2010^-6;
    6 : real thicknessAgEpoxy=2010e-6;

```

---

<div class="post-metadata">

### Author: ![alexrusu](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@alexrusu](https://community.freefem.org/u/alexrusu)
#### Post date: [March 1, 2023, 1:01pm UTC](https://community.freefem.org/t/thin-layer-modelling/2302/3 "2023-03-01T13:01:48Z")

</div>

Hi,

Thank you! That line should have been:  
real thicknessAgEpoxy=20\*10^-6;

I do not know why the multiplication sign between 20 and 10 did not show up. Yes it look like if I change to 20e-6 it does converge, but it is wired why when multiplying by 10^-6 would give an error.
