CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [waves2Foam] using waves2foam in OF2.3.0 (https://www.cfd-online.com/Forums/openfoam-community-contributions/205698-using-waves2foam-of2-3-0-a.html)

eb19 November 24, 2017 15:52

using waves2foam in OF2.3.0
 
Dear All,

I want to simulate a cylinder in a numerical wave tank and I've been using OF2.3.0. Previously I got no error when implementing this solver in a two-dimensional problem, but now in this 3D case, I have this following error:


wrong token type - expected Scalar, found on line 0 the word 'nan'M FATAL IO ERROR:
[23] wrong token type - expected Scalar, found on line 0 the word 'nan'
[23]
[23] file: /scratch1/ele12/OpenFOAM/a04f1v3/processor23/system/data.solverPerformance.p_rgh at line 0.
file: /scratch1/ele12/OpenFOAM/a04f1v3/processor23/system/data.solverPerformance.p_rgh at line 0.

In OF2.3.0, the p_rgh boundary condition imposed for a no-slip boundary is fixedFluxPressure, with value uniform 0. But often from a tutorial case of wave2foam, I noticed the p_rgh boundary condition imposed on a wall surface is zeroGradient.

I think both terms have the same physical meaning. If not, could this be one of the reasons causing the above error? My mesh is okay as I did check the mesh.

Could anyone give me a hint or suggestion please?

Regards
eb19

Ahmed Elhanafi November 25, 2017 02:11

Quote:

Originally Posted by eb19 (Post 672785)
Dear All,

I want to simulate a cylinder in a numerical wave tank and I've been using OF2.3.0. Previously I got no error when implementing this solver in a two-dimensional problem, but now in this 3D case, I have this following error:


wrong token type - expected Scalar, found on line 0 the word 'nan'M FATAL IO ERROR:
[23] wrong token type - expected Scalar, found on line 0 the word 'nan'
[23]
[23] file: /scratch1/ele12/OpenFOAM/a04f1v3/processor23/system/data.solverPerformance.p_rgh at line 0.
file: /scratch1/ele12/OpenFOAM/a04f1v3/processor23/system/data.solverPerformance.p_rgh at line 0.

In OF2.3.0, the p_rgh boundary condition imposed for a no-slip boundary is fixedFluxPressure, with value uniform 0. But often from a tutorial case of wave2foam, I noticed the p_rgh boundary condition imposed on a wall surface is zeroGradient.

I think both terms have the same physical meaning. If not, could this be one of the reasons causing the above error? My mesh is okay as I did check the mesh.

Could anyone give me a hint or suggestion please?

Regards
eb19

Hi eb19,

I have the same problem as you. I'm using OF2.3.0 and apply zeroGradient for the pressure boundary condition on the cylinder surface. I think the problem is related to the volume fraction (alpha) that goes to a very large number (10^5....). You can see this in your .log file for your simulation.
Are you using adjustable timestep?. This can fix up your problem but will increase the computation time due to the very small time step for a Courant number less than 1.
Another thing that you could try is to use a relaxation factor, but this could affect your final results at each time step, as far as I understand.

Kind Regards,
Ahmed


All times are GMT -4. The time now is 11:59.