CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[waves2Foam] Starting issues with OpenFOAM 2.1.1 and spilling breaker using wave2foam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 25, 2013, 00:19
Default Starting issues with OpenFOAM 2.1.1 and spilling breaker using wave2foam
  #1
New Member
 
Hf
Join Date: Nov 2012
Posts: 29
Rep Power: 14
jasonchen is on a distinguished road
Hello Niels,

Months ago I started to learn OpenFOAM v2.1.1 and I'm interested in wave generation and further wave-structure interaction within the framework of OF. It's great to see that you have developed a toolbox. I am trying to learn it by first running the tutorials within the wave2foam package.

Currently as you said, the SVN is currently down (see: http://openfoamwiki.net/index.php/Main_Page). I downloaded the package from a source I have forgotten, but I copied the code into the my home directory and it seems that it's compiled successfully, as I can run all the tutorials except periodicSolitary and 3Dwaves. I reported part of the info below, could you please take some time to help me check what's going wrong? Thanks in advance.

1. periodicSolitary
In blockMesh...

Reading patches section
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file blockMesh/blockMeshTopology.C at line 129
Old-style cyclic definition. Splitting patch cyclic1 into two halves cyclic1_half0 and cyclic1_half1
Alternatively use new 'boundary' dictionary syntax.

In setWaveField...
Reading field alpha

--> FOAM FATAL IO ERROR:
Cannot find patchField entry for cyclic cyclic1_half0
Is your field uptodate with split cyclics?
Run foamUpgradeCyclics to convert mesh and fields to split cyclics.

2. 3Dwaves
faceSet
/opt/openfoam211/bin/tools/RunFunctions: line 47: faceSet: command not found
====
Converting faces on zone "f0" into baffles.

--> FOAM FATAL ERROR:
Cannot find faceZone "f0"
Valid zones are
0
(
)

From function createBaffles
in file createBaffles.C at line 175.
====
setsToZones

Create polyMesh for time = 0

--> FOAM FATAL ERROR:
Cannot find file "" in directory "polyMesh/sets" in times 0 down to constant

From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
in file db/Time/findInstance.C at line 140.

Last edited by jasonchen; January 25, 2013 at 00:36.
jasonchen is offline   Reply With Quote

Old   January 25, 2013, 00:43
Default
  #2
New Member
 
Hf
Join Date: Nov 2012
Posts: 29
Rep Power: 14
jasonchen is on a distinguished road
Hello Niels,

Another question about the breaking wave validation case in your paper, 3.3

As there is slope in the computational domain, fig 8, did you use snappyHexMesh to generate the meshes? The geometry is rather simple, but by using snappyHexMesh, I have to prepare a STL file, and input a large number of parameters in snappyHexMeshDict. Have you got any idea to easily prepare the required files?

Regards,
Jason
jasonchen is offline   Reply With Quote

Old   January 27, 2013, 16:37
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jason,

With respect to the cyclic and the baffles, apparently the syntax has changed to your version of OF from the version I originally developed waves2Foam in. When you have figured out how to solve it, please write me, so I can modify the tutorials.

Secondly, I used my own small matlab-script to create the mesh. I will upload the mesh files here as soon as possible.

Kind regards,

Niels
ngj is offline   Reply With Quote

Old   January 28, 2013, 16:48
Default
  #4
New Member
 
Hf
Join Date: Nov 2012
Posts: 29
Rep Power: 14
jasonchen is on a distinguished road
Hi Niels,
Thanks for your quick reply. Now i managed to creat a mesh using blockMesh. I modified the waveProperties file for waveFlume to simulate the spilling breaker case.
The file is copied below. Is it ok to specify initializationName as inlet in this case.

// A list of the relaxation zones in the simulation. The parameters are given
// in <name>Coeffs below.
relaxationNames (inlet);
initializationName inlet;
pName p_rgh;
inletCoeffs
{
// Wave type to be used at boundary "inlet" and in relaxation zone "inlet"
waveType cnoidalFirst;
Tsoft 2;
depth 0.400000;
period 2;
direction (1 0 0);
height 0.125;

// Specifications on the relaxation zone shape and relaxation scheme
relaxationZone
{
relaxationScheme Spatial;
relaxationShape Rectangular;
beachType Empty;

relaxType INLET;
startX (-8 0.0 0);
endX (-4 0.0 0.1);
orientation (1.0 0.0 0.0);
}
};

Another big problem is that when i run the case using Allrun script, either w/ or w/t setWaveParameters, the waveProperties file under constant directory is automatically replaced with one using stokeFirst, which is exactly the file for waveFlume case. And for the run with setWaveParameters step, it complains that period is not specified for stokeFirst. Do you have any idea about this? Could you please help me check the file or send me your version of input file for this case? Thanks.

Jason
jasonchen is offline   Reply With Quote

Old   January 28, 2013, 17:04
Default
  #5
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jason,

With respect to the initializationName, you can use whatever sub-dictionary, which you have defined.

With respect to the setWaveParameters, then you have to specify input in waveProperties.input. Then a correct waveProperties file is generated, if all input is given correctly in waveProperties.input (look at section 4.1.1. on the wiki: http://openfoamwiki.net/index.php/Co...WaveParameters or the 3Dwaves tutorial).

Also, please note that the Allrun script is tailored for the specific tutorial, thus since setWaveParameters is not used in that tutorial, a tailored waveProperties file is distributed with the tutorial.

Kind regards,

Niels

P.S. Good that you got your mesh working.
ngj is offline   Reply With Quote

Old   January 29, 2013, 04:40
Default
  #6
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
@Jason: You can find the mesh I used here: http://www.student.dtu.dk/~ngja/mesh.tar.gz

Kind regards,

Niels

Last edited by wyldckat; September 2, 2018 at 17:54. Reason: removed answer to another post on the main thread
ngj is offline   Reply With Quote

Old   April 2, 2013, 12:53
Default spilling breaker using wave2foam
  #7
New Member
 
Hf
Join Date: Nov 2012
Posts: 29
Rep Power: 14
jasonchen is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Carlos,

Since it crashes so soon, it is probably related to the mesh motion and VOF coupling. Have you tried running it without waves? I would guess that is still crashes.

@Jason: You can find the mesh I used here: http://www.student.dtu.dk/~ngja/mesh.tar.gz

Kind regards,

Niels
Hi Niels,

I'm using wave2foam to simulate the spilling breaker case. You have explained in your paper that the geometry domain has been altered due to numerical scheme limit. Can you explain more in detail about this?

I copied your computational domain here, plus my domain setup. But results using my setup did not compare well with literature.
https://www.dropbox.com/s/5zrv0ulmsp...er%20setup.png
https://www.dropbox.com/s/0e3oiwz612...al%20state.png

Regards,
Jason
jasonchen is offline   Reply With Quote

Old   April 2, 2013, 18:16
Default
  #8
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jason,

You have to be more specific on your concerns, since it is important for you to tell, how your results differs from the experimental data, otherwise it is hard to tell, where the problems could be. Also, a snap-shot of the mesh with grid lines are more instructive, since you have seen from the article that it is of great importance to retain an aspect ratio of 1 (one).

Secondly, with respect to my differences in the domain, then it is only the truncation at the "shoreline", which differs from the experimental set-up.

Kind regards,

Niels
ngj is offline   Reply With Quote

Old   April 8, 2013, 11:52
Default
  #9
New Member
 
Hf
Join Date: Nov 2012
Posts: 29
Rep Power: 14
jasonchen is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Jason,

You have to be more specific on your concerns, since it is important for you to tell, how your results differs from the experimental data, otherwise it is hard to tell, where the problems could be. Also, a snap-shot of the mesh with grid lines are more instructive, since you have seen from the article that it is of great importance to retain an aspect ratio of 1 (one).

Secondly, with respect to my differences in the domain, then it is only the truncation at the "shoreline", which differs from the experimental set-up.

Kind regards,

Niels
Hi Niels,
I think there is some problem with my mesh. As I try to use the same number of vertical grid points in the region of flat bottom and the end of the slope beach, the aspect ratio at the end of the beach will be greater than 1.0 (about 3 if the air domain height equals 0.2m).

About the boundary condition, I'm not sure about the boundary condition for the bottom and outlet at the end. In your mesh file, you use beach to indicate 'outlet' at the right boundary, and bottom to represent all the bottom patches. Am I right?
For the p_rgh b.c., I specify zeroGradient for both bottom and outlet. And for U, specify fixedValue zero for both.

As for comparison with experimental data, I hope to generate plots like phase-averaged surface elevation at specified points.
https://www.dropbox.com/s/0uudy6hx9l...aged%204-6.jpg
https://www.dropbox.com/s/02fpekwh3k...auges%20AR.jpg
Have you ever plotted these figures during your simualtion?
jasonchen is offline   Reply With Quote

Old   April 8, 2013, 12:46
Default
  #10
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jason,

From what you are saying, the problem is definitely with your aspect ratio. As you will see in my paper, I also get bad results for an aspect ratio larger than 1 (tested for AR=2).

Secondly, I do not have an outlet. The beach is a closed wall.

Kind regards

Niels
ngj is offline   Reply With Quote

Old   July 15, 2015, 11:46
Default
  #11
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by jasonchen View Post
Hi Niels,

I'm using wave2foam to simulate the spilling breaker case. You have explained in your paper that the geometry domain has been altered due to numerical scheme limit. Can you explain more in detail about this?

I copied your computational domain here, plus my domain setup. But results using my setup did not compare well with literature.
https://www.dropbox.com/s/5zrv0ulmsp...er%20setup.png
https://www.dropbox.com/s/0e3oiwz612...al%20state.png

Regards,
Jason
Hellow Jason
I used waveFoam test the spilling breaker case of Kirby's experiment with k-w turbulence model. however the omega always collapse. I want to know did you use turblunce closure for wave breaking?
Best regards
Fan fei
Fanfei is offline   Reply With Quote

Old   July 15, 2015, 12:43
Default
  #12
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by jasonchen View Post
Hi Niels,
I think there is some problem with my mesh. As I try to use the same number of vertical grid points in the region of flat bottom and the end of the slope beach, the aspect ratio at the end of the beach will be greater than 1.0 (about 3 if the air domain height equals 0.2m).

About the boundary condition, I'm not sure about the boundary condition for the bottom and outlet at the end. In your mesh file, you use beach to indicate 'outlet' at the right boundary, and bottom to represent all the bottom patches. Am I right?
For the p_rgh b.c., I specify zeroGradient for both bottom and outlet. And for U, specify fixedValue zero for both.

As for comparison with experimental data, I hope to generate plots like phase-averaged surface elevation at specified points.
https://www.dropbox.com/s/0uudy6hx9l...aged%204-6.jpg
https://www.dropbox.com/s/02fpekwh3k...auges%20AR.jpg
Have you ever plotted these figures during your simualtion?
Hi jasonchen:
Have you solve this question now?
Best regards
Fan Fei
Fanfei is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 17:20.