Hi all,
I am currently trying to use Elmer as the cfd-side of an explicit fluid-structure coupling scheme with Code Aster. I cannot use elmer for the structure side because I need axisymmetry, hyperelasticity and contact.
The .sif is build from the structure solution, with an imposed motion on the FSI boundary, handled by the MeshSolve solver. The cfd problem is solved in one step time from a previously saved state. The problem is that the mesh velocity is not correctly computed between restarts: it is always 0 on the FSI boundary.
Restrarts seems to be fine, the .name file does contains all variables needed:
Variables in file: curve.dat
File started at: 2009/10/20 10:39:33
199 boundary nodes for each step
0 polyline nodes for each step
1: Time step
2: Iteration step
3: Boundary condition
4: Node index
5: velocity 1
6: velocity 2
7: pressure
8: mesh update 1
9: mesh update 2
10: coordinate 1
11: coordinate 2
12: coordinate 3
13: mesh velocity 1
14: mesh velocity 2
So I started to play with MeshSolve.src and found that the mesh velocity is computed with:
MeshVelocity = ( MeshUpdate - Solver % Variable % PrevValues(:,1) ) / dt
The fact is that "Solver % Variable % PrevValues(:,1)" contains the previously computed MeshUpdate variable, as expected, but on the FSI boundary it is updated with the current Dirichlet conditions. I tried to save the PrevValues solution right at the beginning of the MeshSolve solver but no luck, it seems to be modified elsewhere.
Then I started to look at the LoadRestartFile subroutine, but does not seems that there is any Dirichlet BC related stuff in it.
Well I'm stuck for the moment because of my near-to-zero F90 level, so if anybody has an idea of what appens to the variables between LoadRestartFile and MeshSolve, his advice will surely be very appreciated
Happy elmer-ing
Ect.
Moving mesh velocity with restarts
Moving mesh velocity with restarts
- Attachments
-
- fluid_model.zip
- (104.58 KiB) Downloaded 478 times
-
- Site Admin
- Posts: 4864
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Moving mesh velocity with restarts
Quickly looking through the sif I found the following suspect:
In the expression "Mesh Update 2 = Variable Coordinate 2" chanching the 2nd index to 1 might make a difference. If this doesn't help let's have another go.
Some issues of beuty and efficiency:
In the simulation section set the "Steady State Max Iterations" to 1, as you don't have any real coupling (no effect though). I think it would be better to do the mesh update after the N-S rather than before.
For speed, add this to the two real solvers as the default direct solver is banded lapack
You can also use an include statement for the linear dependencies as in:
-Peter
In the expression "Mesh Update 2 = Variable Coordinate 2" chanching the 2nd index to 1 might make a difference. If this doesn't help let's have another go.
Some issues of beuty and efficiency:
In the simulation section set the "Steady State Max Iterations" to 1, as you don't have any real coupling (no effect though). I think it would be better to do the mesh update after the N-S rather than before.
For speed, add this to the two real solvers as the default direct solver is banded lapack
Code: Select all
Linear System Direct Method = umfpack
Code: Select all
Surface Height = Variable Coordinate 1
Real
include ../global/growth_bc.dat
End
Re: Moving mesh velocity with restarts
Thank you for your reply, I have just modified the .sif but the problem is still there. For the "Mesh Update 2 = Variable Coordinate 2" I just replaced it by "Mesh Update 2 = 0" for the sake of clarity.
I made three pictures of the mesh update process: the first one at t=0 shows that the MeshUpdate.1 variable is 0 everywhere The second one shows the MeshUpdate.1 at t=0+dt: For the third one I just diverted the MeshSolve's "Solver % Variable % PrevValues(:,1)" variable to MeshVelocity. The picture should show the MeshUpdate.1 variable at t=0, i.e. should be 0 everywhere, but on the updated mesh: We can see that PrevValues(:,1) is 0 everywhere but on the moving boundary where it equals MeshUpdate at t=0+dt.
So, at t=0+dt, PrevValues(:,1) is equal to MeshUpdate at t=0 but with the Dirichlet BC from t=0+dt... which is not what I was expecting because the mesh velocity will be 0 on the FSI boundary.
Any idea on this?
Ect
I made three pictures of the mesh update process: the first one at t=0 shows that the MeshUpdate.1 variable is 0 everywhere The second one shows the MeshUpdate.1 at t=0+dt: For the third one I just diverted the MeshSolve's "Solver % Variable % PrevValues(:,1)" variable to MeshVelocity. The picture should show the MeshUpdate.1 variable at t=0, i.e. should be 0 everywhere, but on the updated mesh: We can see that PrevValues(:,1) is 0 everywhere but on the moving boundary where it equals MeshUpdate at t=0+dt.
So, at t=0+dt, PrevValues(:,1) is equal to MeshUpdate at t=0 but with the Dirichlet BC from t=0+dt... which is not what I was expecting because the mesh velocity will be 0 on the FSI boundary.
Any idea on this?
Ect
Last edited by Ect on 20 Oct 2009, 14:50, edited 1 time in total.
Re: Moving mesh velocity with restarts
Here is a picture of the resulting Mesh Velocity :
wich is 0 on the FSI boundary.-
- Site Admin
- Posts: 4864
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Moving mesh velocity with restarts
Maybe you can try the following flags of the Simulation section
The 1st one may be what you're looking (the default is True). These take effect in the ElmerSolver.src in subroutine SetInitialConditions.
-Peter
Code: Select all
Initialize Dirichlet Conditions = Logical False
Restart Before Initial Conditions = Logical True
-Peter
Re: Moving mesh velocity with restarts
It works !
Ect
Thank you for such a fast answer !Ect