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   June 12, 2016, 09:55
Default mean water level increase
  #21
New Member
 
Theo Moura
Join Date: Jun 2016
Posts: 3
Rep Power: 6
theogrm is on a distinguished road
Hi all,

I've been trying to simulate bichromatic wave groups propagating over a sloping beach using the irregular waveType. The problem I am having is the water level that is constantly increasing. I have in the waveDict both absGen true and absDir 0. Tried different combination with no success. Any hint will be appreciated.

Best Regards,

Theo
theogrm is offline   Reply With Quote

Old   June 12, 2016, 21:13
Default
  #22
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi Theo,

absorption does work with irregular waves. Check your variables, absGen does not exist, it should be genAbs. If your waves are propagating in the +X direction, then absDir 0 is fine. Just to be safe, you can always set it to a value > 360

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 13, 2016, 13:07
Default
  #23
New Member
 
Theo Moura
Join Date: Jun 2016
Posts: 3
Rep Power: 6
theogrm is on a distinguished road
Hi Pablo,

thank you for your reply,

I've tested two cases with the same setup, but different waveDict.

In the first one irregular waveType was used and the water level is constantly increasing. In the second case, I used regular waveType with no visible changes in the water level.

Not sure what I am doing wrong.

Best Regards,

Theo

WaveDict Case 1

waveType irregular;

genAbs 1;

absDir 0.;

nPaddles 1;

tSmooth 3.;

secondOrder 1;

wavePeriods
2
(
1.0776
0.9756
);
waveHeights
2
(0.05
0.05
);
wavePhases
2
(
1.977467
2.549666
);
waveDirs
2
{0.};

// **

WaveDict Case 2

waveType regular;

waveTheory cnoidal;

genAbs 1;

absDir 0.0;

nPaddles 1;

waveHeight 0.15;

wavePeriod 2;

waveDir 0.0;

wavePhase 4.71238898;
theogrm is offline   Reply With Quote

Old   June 14, 2016, 01:55
Default
  #24
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi Theo,

maybe it is an issue with 2nd order generation, I will take a look, thanks for reporting.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 14, 2016, 22:59
Default
  #25
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi again,

I have done some tests and ended up changing the code. I tested your bichromatic sea state with second order for 150 s and the mass is not increasing now.

Please update the code, recompile and try again.

Best,

Pablo
Attached Images
File Type: jpg figure_1.jpg (35.1 KB, 80 views)
Phicau is offline   Reply With Quote

Old   June 15, 2016, 09:20
Default
  #26
New Member
 
Isabelle Schmidt
Join Date: May 2016
Posts: 5
Rep Power: 6
Ilse is on a distinguished road
Hi there,
I'm trying to simulate a wave that flows into a channel that is below the watersurface. I can see the movement of the wave by Ux. But Ux does't change in the channel, it seems as if the wave just moves on, as if there isn't any obstacle. Is Ux appropriate to observate the movement of the wave?
Ilse is offline   Reply With Quote

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

I cannot picture your problem correctly with your short description. Maybe an issue with the mesh not being fine enough? Maybe due to incompressible phases? Just guessing...

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 17, 2016, 04:38
Default Validation of wave run-up height
  #28
New Member
 
Martin Silkens
Join Date: Apr 2016
Posts: 10
Rep Power: 6
ms411 is on a distinguished road
Dear Pablo,

like you told me, I should validate the run-up height of my waves on a dike. I did the post-processing with paraview and exported my results to excel. There I noticed, that my wave run-up heights are to high.

I tried now to produce friction with the k-epsilon-function on the ground and on the dike, that the waves will run-up less. But the results are still the same.

Isn't it possible to use k-epsilon-function in olaFoam? Should I use another wave theory (now I am using cnoidal), maybe it is not good enough for shallow water. Or do I have to change something in the solver?

Thank you for an answer and your efforts!

Best regards

Martin
ms411 is offline   Reply With Quote

Old   June 19, 2016, 08:49
Default
  #29
New Member
 
Isabelle Schmidt
Join Date: May 2016
Posts: 5
Rep Power: 6
Ilse is on a distinguished road
Hey Pablo,
Thank you for your reply. I tried to figuer out what exactly my problem is.
1. why is the velocity across the depth that low? The values for Ux are between 10^(-6)-10^(-7)?
2. I tried to run a simulation with momentumPredictor on but it didn't work: "keyword Ufinal is undefined"


I used one of the examples as waveDict:
waveType regular;

waveTheory cnoidal;

genAbs 1;

absDir 0.0;

nPaddles 1;

waveHeight 0.10;

wavePeriod 3;

waveDir 0.0;

wavePhase 4.71238898;

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

Old   June 19, 2016, 22:23
Default
  #30
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
@Martin,

k-epsilon does work in olaFoam and depending on the case, it can have quite affect quite a lot. Dynamics and mesh size/shape can have an impact on that and you can also introduce rough wall functions, but if you don't know if you should be using cnoidal theory, you definitely need to study more.

@Isabelle,

Are you sure that you are measuring the X component and not the Y component? Check this video, the top panel shows exactly that wave conditions (baseWaveFlume):

https://www.youtube.com/watch?v=dNffOs-1Esw

At t = 15 s, water velocities in the X direction vary from 0.6 to -0.17 m/s.

If you want to use momentumPredictor, you need to define the solver and convergence criteria for Ufinal in fvSolution. Look for Ufinal word in the tutorials folder to have a better idea.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 20, 2016, 02:05
Default Can the Olafoam be used to simulate the longshore currents?
  #31
New Member
 
chunping ren
Join Date: May 2016
Posts: 8
Rep Power: 6
handsomedog is on a distinguished road
Hi there,
I think the Olafoam can be used to simulate the longshore currents whatever in practical field and laboratory. But I did not find any publications or reports about this in recent days. Could you give me some suggestions how to use the Olafoam to calculate the 2D or 3D longshore currents ?
Best regards
Chunping
handsomedog is offline   Reply With Quote

Old   June 20, 2016, 02:33
Default
  #32
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi Chunping,

it is possible, just match your experimental facility. For field conditions you would need to be more careful with the lateral boundary conditions.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 20, 2016, 05:24
Default
  #33
New Member
 
chunping ren
Join Date: May 2016
Posts: 8
Rep Power: 6
handsomedog is on a distinguished road
Hi Pablo,
Thank your reply quickly very much. I will focus on the simulation of longshore currents using Olafoam due to your suggestions. And I would like to share with you about this in the future.
Cheers
Chunping
handsomedog is offline   Reply With Quote

Old   June 29, 2016, 04:08
Default
  #34
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Dear all,

I have updated olaFoam to work under the newly released OpenFOAM 4.0. You can find all the details here:

https://sites.google.com/site/olafoa...edtoopenfoam40

Best regards,

Pablo
Phicau is offline   Reply With Quote

Old   July 4, 2016, 05:15
Default
  #35
New Member
 
Isabelle Schmidt
Join Date: May 2016
Posts: 5
Rep Power: 6
Ilse is on a distinguished road
Dear Pablo,

For my case I have to simulate irregular waves, is that possible with olaFoam? I looked at the tutorial irreg45degTank, but I do not really understand how you built that waveDict ?!
Thank you very much for your help,
best regards
isabelle
Ilse is offline   Reply With Quote

Old   July 4, 2016, 05:26
Default
  #36
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi Isabelle,

please check the additional materials included in the zip file, there is a complete guide that can help you.

An irregular sea state is just the summation of N individual components, as Theo showed in a previous post (with just 2 components). The way to calculate the components is up to you and your sea state requirements.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   July 8, 2016, 05:50
Default
  #37
New Member
 
Isabelle Schmidt
Join Date: May 2016
Posts: 5
Rep Power: 6
Ilse is on a distinguished road
Dear Pablo,
I plotted my residuals and I have 2 questions about it:
1. There are no residuals/information about U, neither x,y,z. Do you know why?
2. The residuals for alpha.water and p_rgh are increasing, what can be the problem?

My case is a 2D channel with waveDict as following:

waveType regular;

waveTheory StokesI;

genAbs 1;

absDir 0.0;

nPaddles 1;

waveHeight 2.3;

wavePeriod 8.36;

waveDir 0.0;

wavePhase 4.71238898;








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

Old   July 10, 2016, 05:17
Default
  #38
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
Hi Isabelle,

there is no problem at all, you are not running a steady-state solver, you are running a transient one. Therefore, the numbers that you see do not mean that your simulation is diverging, only that it is evolving in time. Each time step your solutions is iteratively calculated until the tolerances defined are met.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   July 10, 2016, 19:06
Default Implementing dynamic floating box
  #39
New Member
 
Abigail Stehno
Join Date: Sep 2015
Posts: 8
Rep Power: 6
abigail_s is on a distinguished road
Hi,
First of all- thank you for creating the olaFoam solver! It is very helpful and easy to understand.
I am trying to implement a floating box using the waveFlume tutorial. I have modified the tutorial so the dynamic motion is in the floating box. The case works fine when the floating box is not added. According to checkMesh, mesh is good with and without the floating box. Below is the error I am receiving:

In serial:
Code:
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2   in "/lib64/libc.so.6"
#3  Foam::PhiScheme<double, Foam::interfaceCompressionLimiter>::limiter(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:?
#4  Foam::limitedSurfaceInterpolationScheme<double>::weights(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:?
#5  Foam::surfaceInterpolationScheme<double>::interpolate(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:?
#6  Foam::fv::gaussConvectionScheme<double>::interpolate(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:?
#7  Foam::fv::gaussConvectionScheme<double>::flux(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:?
#8  
 at ??:?
#9  
 at ??:?
#10  __libc_start_main in "/lib64/libc.so.6"
#11  
 at ??:?
./runCase: line 19:  8567 Floating point exceptionolaDyMFoam > olaDyMFoam.log
In parallel:
Code:
[0] #0  Foam::error::printStack(Foam::Ostream&)[1] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[0] #1  Foam::sigFpe::sigHandler(int) at ??:?
[1] #1  Foam::sigFpe::sigHandler(int) at ??:?
[0] #2   at ??:?
[1] #2   in "/lib64/libc.so.6"
[0] #3  Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) in "/lib64/libc.so.6"
[1] #3  Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) at ??:?
[0] #4   at ??:?
[1] #4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&)Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
[1] #5   at ??:?
[0] #5  

[1]  at ??:?
[1] #6  __libc_start_main[0]  at ??:?
[0] #6  __libc_start_main in "/lib64/libc.so.6"
[1] #7   in "/lib64/libc.so.6"
[0] #7
In both cases the .log file abruptly ends with large time step continuity errors. Visually, in ParaView the floating box begins to have a velocity around it on the first timestep and the wave is just beginning to form. On the second timestep the velocity on the box walls and surrounding area is very high, again the wave has not reached. This velocity increase in turn increases my Courant number and the simulation crashes. I have added restraints and changed the mass of the box in the dynamicMeshDict hoping this was the reason for the additional velocity but it is not.

Also, why am I getting two different errors between serial and parallel?
Code is attached- Thank you in advance!

Abbie
Attached Files
File Type: zip floatingBreakwater.zip (90.5 KB, 17 views)
abigail_s is offline   Reply With Quote

Old   July 11, 2016, 03:06
Default
  #40
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 550
Rep Power: 14
Phicau is on a distinguished road
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
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 16:12.