ff3d-users
[Top][All Lists]

## Re: [ff3d-users] Variational form of potential flow with free surface on

 From: Thomas Ward Subject: Re: [ff3d-users] Variational form of potential flow with free surface on mesh Date: Thu, 08 Jan 2009 20:11:17 +0000 User-agent: Thunderbird 2.0.0.19 (X11/20090105)

```Stephane

```
last May you gave me a pointer to how to work with periodic boundary conditions in ff3d. 8 months later I have found the time to try it.....
```
1.
```
I'm not able to get it to work, my file is attached at the end of this message can you see what I am doing wrong?
```
2.
```
I would like to understand how it is implemented in the code have been trying to understand code but can't manage to follow it. Can you point me in the right directions, so far I have been looking through MeshPeriodizer.cpp and VerticesCorrespondance.cpp , Mesh.cpp and SurfaceMeshOfQuadrangles.cpp
```
```
I can see that the nodes of the end boundary of the structured mesh are mapped to the nodes of the start boundary but I am struggling to see how this is carried forwards to the solver.
```
Are there any papers which describe the method you have followed?

Tom Ward.

vertex a = (0,0,0);
vertex b = (10,10,10);
vector n = (25,50,10);

mesh M = structured(n,a,b);
//this next line is the only change I made to the static solution
M = periodic(M,0:1);

double f=1.4;
function alpha=f*f/9.81;
solve(phi) in  M
{
test(w)
+int[M zmax](w*alpha*phi)
+int[M xmin](w*f)
-int[M xmax](w*f)
=0;
};

save(vtk,"tank-varA-periodic",phi,M);

Thomas Ward wrote:

```
Many thanks Stephane,
```
```
I hope to try the periodic conditions next week, its not totally clear to me how the periodic mesh becomes a periodic boundary condition but I will have a try first and then ask if I can't work it out.
```

Tom

Stephane Del Pino wrote:
```
```......
```
```I'm about to try using periodic BC, I note from the mailing list that
you were playing around with this a couple of years ago, do you have any
sample files or other documentation or pointers to the source code?
```
Yes this is not a big deal in ff3d. Assume that M is your structured mesh, then
```    M = periodic(M,0:1,2:3,4:5);
will create a triperiodic mesh where
0 represents xmin,
1 represents xmax,
2 represents ymin,
3 represents ymax,
4 represents zmin,
5 represents zmax,

M = periodic(M,2:3);
```
would create a periodic mesh in the direction y. Note that up to now M must be a structured mesh.
```
```
```

```