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

[OLAFLOW] The OLAFOAM Thread

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree13Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2016, 11:02
Default Generation of regular waves
  #41
New Member
 
Martin Silkens
Join Date: Apr 2016
Posts: 10
Rep Power: 6
ms411 is on a distinguished road
Dear Pablo,

I want to generate regular waves with OlaFoam, and to calibrate them with the HUNT formula. My problem is how to generate regular waves, where the wave trough is equal to the wave crest. Until now I generated waves with the cnoidal wave theory and Stokes I, but I want to generate waves due to cosine function/ airy laplace wave theory.

Now I tried to take the irregular wave type entry in the wave.dict in order to do just one entry with one wave, that I get only regular waves, but then I get an error. So I did two entries, and then there is a superposition of this two waves, but this doesn't work also, because not every wave is equal.

Is OlaFoam able to generate regular waves?

Thank you very much for an answer and best regards

Martin
ms411 is offline   Reply With Quote

Old   July 11, 2016, 22:02
Default
  #42
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
HI Martin,

I guess you need to study more and review the reference materials included with olaFoam: Stokes I is the same as Airy waves and Linear wave theory, i.e. wave free surface generated according to a cosine.

If you experience asymmetry between crests and troughs it is maybe due to generating the waves out of the suitable relative depth.

Dear all,

I would like to announce that olaFoam is now compatible with the latest OpenFOAM and OpenFOAM+ versions (4.0 and 1606+), including all the tutorials. You can find more information about updating in the following site:

https://sites.google.com/site/olafoamcfd/source-code

Best,

Pablo

Last edited by Phicau; July 11, 2016 at 22:09. Reason: Add update announcement
Phicau is offline   Reply With Quote

Old   July 14, 2016, 00:34
Default
  #43
New Member
 
Abigail Stehno
Join Date: Sep 2015
Posts: 8
Rep Power: 6
abigail_s is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Abigail,

remember that your solution is as good as your mesh. OpenFOAM reporting "mesh OK" does not guarantee that it really is suitable for your case, and floating body simulations are really (REALLY) sensitive to the mesh.

Your resolution in the y direction is simply not enough, try refining.

Best,

Pablo
Hi Pablo,
Thank you for the advice. I increased the y and z directions by 10 times. I am still receiving the same error

Abbie
abigail_s is offline   Reply With Quote

Old   July 14, 2016, 03:21
Default
  #44
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi Abgail,

sorry to hear that increasing the resolution did not solve the problem. If you search the forum, there are lots of people reporting interDyMFoam simulations blowing up and being extremely sensitive to the parameters you use (e.g. floating body tutorial case).

I have not performed a lot of floating simulations myself, but I did modify the floating body tutorial case to run with waves plus some restrictions without much problem. Take a look at that case and double check all your parameters, as inertias, mass...

Best,

Pablo
Phicau is offline   Reply With Quote

Old   July 21, 2016, 20:45
Default
  #45
New Member
 
Abigail Stehno
Join Date: Sep 2015
Posts: 8
Rep Power: 6
abigail_s is on a distinguished road
Hi Pablo,
I have been using the interDyMFoam floating object tutorial and the olaFoam breakwater and pistonFlume tutorials to create my case.
The maximum alpha and time step continuity errors cause the case to blow up. I have tried to adjust the mesh refinement and time steps in hopes that this was a Courant issue, but this was not the correct solution. I have also changed the gradSchemes between cell limited leastSquares and gauss limited. I have tried both GAMG and PCG solvers with various preconditioners. I cannot find a difference in boundary conditions between my case and the floatingObject tutorial. I have also tried including a turbulence model but received the same error.

Lastly, I have tried to add the olaFoam solver to the floatingObject tutorial and received this error:
Code:
#3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<do$
#4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<doub$
#5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
I have not had enough time to change the fvSolution file to see if my modified floatingObject tutorial will work with a different solver.

Do you have any other suggestions?

Thank you - Abbie
abigail_s is offline   Reply With Quote

Old   July 24, 2016, 14:30
Default Calibration of wave-run up height
  #46
New Member
 
Martin Silkens
Join Date: Apr 2016
Posts: 10
Rep Power: 6
ms411 is on a distinguished road
Dear Pablo,

thanks again for your advice due to the water depth. The wave run-up height of my non breaking waves is still not high enough. I tried to increase the paddles, to change the distance from the wave generator to the dike toe, to reduce the density of water in my transport properties and to change the cell size. But everything was without success.

Do you have any advice how I can increase my wave run-up height?

Thank you very much in advance!

Best regards

Martin
ms411 is offline   Reply With Quote

Old   July 25, 2016, 05:07
Default
  #47
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi Abbie,

it seems like one of these cases in which the model just blows up without much explanation. Maybe you could isolate the problem by saving the last time steps and check where instabilities arise. I have also experienced such problems when adding constraints that were physical, but OpenFOAM didn't seem to like. Sorry fr not being of much help here, floating objects are a very difficult field to master in OpenFOAM and I feel that sometimes their performance depends more on chance than on how proficient the user is.

Hi Martin,

there are several processes that might be going wrong there. Your solution might be dependent on how fine your mesh is at the slope, the cell size and shape. Also, if the runup water tongue is very thin, it might be affected by spurious currents.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   July 30, 2016, 05:57
Default Wave run up and laminar setting
  #48
New Member
 
Martin Silkens
Join Date: Apr 2016
Posts: 10
Rep Power: 6
ms411 is on a distinguished road
Dear Pablo,

my cells are 2,5 cm in x,y and z direction, so I would expect a maximal deviation of 5 cm. But my run up for non breaking waves reaches only a value of 70% of the HUNT formula.

But a basic question I ask myself is, if I choose "laminar" setting in my turbulence properties, how can waves break at the structure?

I was thinking about two shapes:

Is "laminar" setting only meant for the boundary conditions like walls in my system? My other thought was, that "laminar" is something like default setting, and olaFoam nevertheless uses a turbulence model. In this case, I would need for non breaking waves a "real" laminar setting, to rise the wave run up on the dike.

Thank you very much for an answer!

Best regards

Martin
ms411 is offline   Reply With Quote

Old   July 30, 2016, 08:24
Default
  #49
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi Martin,

cells of 2.5 cm do not make your error be around 5 cm necessarily, there are a lot more factors that come into play. For example, is your runup water tongue well represented with that 2.5 cm cells? Is non-orthogonality playing a role there? Are different cell sizes and shapes making an impact? The topic is complex and needs to be studied case by case.

Laminar means that Reynolds stresses are not modelled (nut = 0). Olafoam does not overwrite any variable, it just adds a different set of equations (no change if porosity is absent or equals 0), and wave boundary conditions.

@All, by the way, I am leaving in vacation, so I will not be around next 2 weeks.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 4, 2016, 07:12
Default
  #50
New Member
 
James Bridgwater Court
Join Date: Jan 2016
Posts: 14
Rep Power: 6
jbcourt is on a distinguished road
Hi Pablo,
I know you're away at the moment, so hopefully you'll get a chance to look at this when you return.
I'm trying to simulate a numerical wave tank (NWT) at the moment using olaDyMFoam as my solver - the device in the tank is a pitching flap-type WEC and I've enclosed it within an AMI cylinder that rotates with it as the waves cause the device to move - this is because the large amplitudes of oscillation of this type of device tend to lead to excessive mesh deformation with more standard mesh motion approaches. I've run my mesh through checkMesh and moveDynamicMesh -checkAMI and everything checks out, but for some reason when I run the solver it will reliably run to just over 0.02s NWT time before crashing - see the attached log file for the error messages.

I've tried changing the PIMPLE settings (increasing nOuterCorrectors; changing residualControl to focus on the alpha.water variable, the error in which had been increasing until it failed; and even reducing the relaxationFactors for all equations) and alpha.water solver settings in fvSolution, have tried a few options (Euler, localEuler and crankNicholson) for ddtSchemes and also an alternative scheme for div(phi,alpha) (Gauss vanLeer and Gauss MUSCL) in fvSchemes, but all to no avail. Do you, or anyone else for that matter, have any suggestions for what I should try next?

I'm using OF3.0.1 on Ubuntu.

Thanks,
James
Attached Files
File Type: txt log.olaDyMFoam.txt (76.2 KB, 12 views)
jbcourt is offline   Reply With Quote

Old   August 11, 2016, 01:28
Default
  #51
New Member
 
Join Date: Apr 2015
Posts: 14
Rep Power: 7
Rising Star is on a distinguished road
Hi Pablo

I was interested to run DNS with a floating body. What I have to put into the turbulenceProperties file?

Thanks in advance
Rising Star is offline   Reply With Quote

Old   August 11, 2016, 06:04
Default
  #52
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi James,

it is hard to tell what is going on, there are no evident instabilities and the VOF values are reasonable. For the instant in which the program fails it is probably due to the AMI. I am not sure whether anyone has used AMI and can comment on any restrictions and best practice rules.

Hi Rising Star,

'laminar' would do, but remember that it is not a real DNS unless you have *really* small cells.

Best,

Pablo
jbcourt likes this.
Phicau is offline   Reply With Quote

Old   August 11, 2016, 06:15
Default
  #53
New Member
 
James Bridgwater Court
Join Date: Jan 2016
Posts: 14
Rep Power: 6
jbcourt is on a distinguished road
Thanks for looking at it Pablo. If anyone reading this does have any tips for improving how the AMI works in my case then please let me know as this is driving me up the wall!
Otherwise I think I'll start looking at the immersed boundary method through foam-extend.
jbcourt is offline   Reply With Quote

Old   August 11, 2016, 20:34
Default
  #54
New Member
 
Join Date: Apr 2015
Posts: 14
Rep Power: 7
Rising Star is on a distinguished road
Thank you very much Pablo

Another question: Do you have any experience of including periodic boundary conditions in OlaFoam?

Cheers
Rising Star is offline   Reply With Quote

Old   August 12, 2016, 01:53
Default
  #55
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Yes, no problem using them.
Phicau is offline   Reply With Quote

Old   August 12, 2016, 08:16
Default
  #56
New Member
 
James Bridgwater Court
Join Date: Jan 2016
Posts: 14
Rep Power: 6
jbcourt is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi James,

it is hard to tell what is going on, there are no evident instabilities and the VOF values are reasonable. For the instant in which the program fails it is probably due to the AMI. I am not sure whether anyone has used AMI and can comment on any restrictions and best practice rules.
I've just removed the WEC and then the AMI interface surrounding it to check, and the case is now running perfectly as an empty 3D tank - so you were right, the problem seems to have been to do with the presence of the AMI cylinder.
jbcourt is offline   Reply With Quote

Old   August 14, 2016, 10:28
Default
  #57
New Member
 
Isabelle Schmidt
Join Date: May 2016
Posts: 5
Rep Power: 6
Ilse is on a distinguished road
Dear Pablo,
I'm simulating waves in a channel with Stokes1 in 2D and 3D. Everything is fine in 2D, but in 3D the waterlevel decreases around 1 meter during the first time step, when the waves start to move. I set the waterlevel with setfields on 4.5 m, and i used the contour filter in Paraview to measure the waterlevel (alpha=0.5)
files of the 3D case:
wave-dict:
waveType regular;

waveTheory StokesI;

genAbs 1;

absDir 0.0;

nPaddles 3;

waveHeight 0.231;

wavePeriod 2.6436;

waveDir 0.0;

wavePhase 4.71238898;




U-file:

boundaryField
{
inlet
{
type waveVelocity;
waveDictName waveDict;
value uniform (0 0 0);
}
outlet
{
type waveAbsorption2DVelocity;
absorptionDir 180;
nPaddles 3;
value uniform (0 0 0);
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
front
{

type fixedValue;
value uniform (0 0 0);
}
back
{

type fixedValue;
value uniform (0 0 0);




Thank you very much for your help,
Best regards,
Isabelle
Ilse is offline   Reply With Quote

Old   August 14, 2016, 22:05
Default
  #58
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
HI Isabelle,

I have never experienced such a problem, so most likely there is a problem with you case setup which I cannot infer from the data you provide. Double check all your inputs, especially the setFieldsDict (does water cover all the mesh in the Y direction?)

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 18, 2016, 11:54
Default
  #59
New Member
 
Kostas Margaris
Join Date: Feb 2014
Posts: 15
Rep Power: 8
kmargaris is on a distinguished road
Dear Pablo,

Is it possible to apply a current with a parabolic velocity profile in olaFoam?

Best regards,
Kostas
kmargaris is offline   Reply With Quote

Old   August 18, 2016, 22:05
Default
  #60
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi Kostas,

unfortunately not at this moment, but keep tuned because you will soon be able to.

Best,

Pablo
Phicau is offline   Reply With Quote

Reply

Tags
generation, ihfoam, olafoam, waves

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divergence detected in AMG solver: k when udf loaded google9002 Fluent UDF and Scheme Programming 3 November 7, 2019 23:34
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 04:17
UDF velocity profile willroca Fluent UDF and Scheme Programming 2 January 10, 2016 03:13
Error messages atg enGrid 7 August 30, 2013 11:16
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 14:37


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