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

[OLAFLOW] The OLAFLOW Thread

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

Like Tree46Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2020, 07:35
Default
  #241
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Ben,

from the pictures it seems like the quality of the mesh becomes terrible due to the large displacement. As you say, preventing the free surface from getting into the coarse region certainly helps, I have observed that the VOF advection does not behave well when transitioning into a non-conformal region, and in this case it goes into a really coarse area.

I would suggest a couple of things. First, the deformation zone seems to be quite close to the floating object. If you make this area larger, the deformation will be better distributed and the mesh will become less distorted. Another option is to use the overset mesh functionality, in which one mesh follows the floating object and values get interpolated. However, be ready to lose/gain some mass at the interface of this region due to the interpolation.

For specific questions related to floating objects and not related with waves you will get more visibility and perhaps a better response rate if you post your own thread. best of luck!


@ All,

I have finally managed to find the time to post the setOla utility, which now includes a tutorial and is fully documented in the olaFlow website https://olaflow.github.io/

Quote:
setOla works almost exactly like setFields, it helps you to set your initial conditions for VOF and velocity according to the wave conditions that you have defined as usual in the waveDict file. This utility can be very helpful when you want to save some time (the time that it takes for waves to propagate across the domain) and get the waves into your simulation straightaway.
You can find all the details in this blog post: https://olaflow.github.io/blog/setol...ed-to-olaflow/

Best,
Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   July 3, 2020, 11:44
Default
  #242
New Member
 
Sergio Croquer
Join Date: Jan 2011
Posts: 15
Rep Power: 15
sercro is on a distinguished road
Hello all,

I tried to run a case using interFoam instead of olaFlow as application and it asked for the following term in fvSchemes:

div(((rho*nuEff)*dev2(T(grad(U)))))

Just out of curiosity, does anyone know why is this term required in interFoam but not in olaFlow? ... I thought that olaFlow was identical to interFoam in cases without porosity.

Thanks,
sercro is offline   Reply With Quote

Old   July 3, 2020, 11:49
Default
  #243
New Member
 
Sergio Croquer
Join Date: Jan 2011
Posts: 15
Rep Power: 15
sercro is on a distinguished road
But the way, I just tested the setOla utility successfully in both an incompressible and a compressible case. Let's see if the simulations run well
Phicau likes this.
sercro is offline   Reply With Quote

Old   July 3, 2020, 18:54
Default
  #244
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Sergio,


glad to know that setOla is working for you!


olaFlow is based on interFoam, but solves a different set of equations, that is why some of the schemes that you need to use are named differently, but work in the same way.For example, since I porosity is used in the equations it needs to be included in the schemes too.


In your particular case I work with dynamic viscosity [div((muEff*dev(T(grad(U)))))] and in the solver you were using they work with kinematic viscosity times the density, which in the end is the same.

Best,
Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   July 3, 2020, 21:46
Default
  #245
New Member
 
Sergio Croquer
Join Date: Jan 2011
Posts: 15
Rep Power: 15
sercro is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Sergio,


glad to know that setOla is working for you!


olaFlow is based on interFoam, but solves a different set of equations, that is why some of the schemes that you need to use are named differently, but work in the same way.For example, since I porosity is used in the equations it needs to be included in the schemes too.


In your particular case I work with dynamic viscosity [div((muEff*dev(T(grad(U)))))] and in the solver you were using they work with kinematic viscosity times the density, which in the end is the same.

Best,
Pablo

Thanks for the clarification!
sercro is offline   Reply With Quote

Old   July 5, 2020, 07:54
Default
  #246
Member
 
Haoran Zhou
Join Date: Nov 2019
Posts: 49
Rep Power: 6
Stan Zhou is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Stan,


I believe that your approach fixing A and B is as empirical as selecting alpha and beta, since when D50 and porosity are fixed, A and B are linked with alpha and beta in a direct way.


Nevertheless, yes, you can set A and B yourself quite easily. The code is open source, so download it, make the substitutions and changes that you require and compile it.


Best,
Pablo
Hi Pablo,

Firstly, thanks for your explanation.

These days I've read your article 'Three-dimensional interaction of waves and porous coastal structures using OpenFOAM. Part I' and the manual of olaFlow, I'm a bit confused about the velosity used to solve the closure term [CT]. In the former article, the equation of momentum conservation is devided by porosity n and that is to say, this equation is solved using real velosity rather than Darcy velosity. However, in the olaFlow manual, the momentum conservation equation is not devided by porosity n but the coefficients A B C are the same as those in the former article. So, I wonder whether the velosity used to calculate [CT] and the equation in olaFlow is Darcy velosity or real velosity?

Best regards,
Stan
Stan Zhou is offline   Reply With Quote

Old   July 5, 2020, 18:48
Default
  #247
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Stan,
the information in the old IHFOAM papers and the manual are outdated. The current information on the equations solved by olaFlow can be found in my thesis and in https://olaflow.github.io/numerical-...model-physics/


Best,
Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   July 7, 2020, 09:13
Default objectRegistry error for some turbulence models
  #248
New Member
 
Scott Dunn
Join Date: Jul 2020
Posts: 1
Rep Power: 0
Scott D is on a distinguished road
Dear All,

I have just downloaded olaFlow and it is working well for standard applications and also for some of the turbulence models including kOmegaSSTMultiphase. However it is not running for kOmegaSSTStable or kOmegaSSTBuoyancy. It seems that in both of these models it uses gravity (defined as grav() in the code) which does not appear in the other turbulence models. Can anyone help me to understand how to fix the error (see below).

Thanks very much,
Scott

sed: preserving permissions for ‘constant/sedqR9IFs’: Operation not permitted
blockMesh meshing...
--> FOAM IOWarning :
Found [v1012] 'convertToMeters' entry instead of 'scale' in dictionary "/mnt/c/OpenFOAM/olaFlow/turbulenceMultiphase/tutorials/turbulenceMultiphaseFlume/system/blockMeshDict"

This keyword is deemed to be 108 months old.

Preparing 0 folder...
Setting the fields...
Running...


--> FOAM FATAL ERROR:

request for uniformDimensionedVectorField g from objectRegistry region0 failed
available objects of type uniformDimensionedVectorField are
0()

From function const Type& Foam:bjectRegistry::lookupObject(const Foam::word&, bool) const [with Type = Foam::UniformDimensionedField<Foam::Vector<double> >]
in file /home/pawan/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 463.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::UniformDimensionedField<Foam::Vector<double> > const& Foam:bjectRegistry::lookupObject<Foam::UniformDi mensionedField<Foam::Vector<double> > >(Foam::word const&, bool) const at ??:?
#3 Foam::kOmegaSSTBuoyancy<Foam::eddyViscosity<Foam:: RASModel<Foam::IncompressibleTurbulenceModel<Foam: :transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transpor tModel> >::grav() const at ??:?
#4 Foam::kOmegaSSTBuoyancy<Foam::eddyViscosity<Foam:: RASModel<Foam::IncompressibleTurbulenceModel<Foam: :transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transpor tModel> >::correct() at ??:?
#5 ? at ??:?
#6 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#7 ? at ??:?
./runCase_kOmegaSSTBuoyancy: line 19: 8684 Aborted (core dumped) olaFlow > olaFlow.log
Simulation complete.
Scott D is offline   Reply With Quote

Old   July 7, 2020, 15:26
Default omega's units in compressible kwSST Stable
  #249
New Member
 
Sergio Croquer
Join Date: Jan 2011
Posts: 15
Rep Power: 15
sercro is on a distinguished road
Hello,

Has anyone tried kwSST Stable with compressibleInterFoam? If so, how do you setup the BC for omega, k, nut... I tried a basic case and got the following error regarding omega units:


Code:
--> FOAM FATAL ERROR:
incompatible dimensions for operation
    [omega[1 -3 -2 0 0 0 0] ] + [omega[2 -6 -2 0 0 0 0] ]

    From function void Foam::checkMethod(const Foam::fvMatrix<Type>&, const Foam::fvMatrix<Type>&, const char*) [with Type = double]
    in file /home/sercro/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude/fvMatrix.C at line 1283.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  void Foam::checkMethod<double>(Foam::fvMatrix<double> const&, Foam::fvMatrix<double> const&, char const*) at ??:?
#3  Foam::tmp<Foam::fvMatrix<double> > Foam::operator+<double>(Foam::tmp<Foam::fvMatrix<double> > const&, Foam::tmp<Foam::fvMatrix<double> > const&) at ??:?
#4  Foam::kOmegaSSTStable<Foam::eddyViscosity<Foam::RASModel<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > > >, Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correct() at ??:?
#5  ? at ??:?
#6  __libc_start_main in "/cvmfs/soft.computecanada.ca/nix/store/63pk88rnmkzjblpxydvrmskkc8ci7cx6-glibc-2.24/lib/libc.so.6"
#7  ? at /tmp/nix-build-glibc-2.24.drv-0/glibc-2.24/csu/../sysdeps/x86_64/start.S:122
Aborted
However, if I use kwSST (the standard OF model) there is no error.

Thanks!
sercro is offline   Reply With Quote

Old   July 15, 2020, 03:13
Default
  #250
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Hi,



Many thanks for the olaFlow. I installed the OlaFlow for OpenFOAM v1906, it installed correctly. I am trying to use OlaFlow along with the turbinesFOAM but there seems to some problem with it. Even if I am using OlaFlow (in control Dict) it is simulating through the interPhaseChangeFoam and moreover if I am trying with no wave etc, it is creating waves for velocity and alphawater. Also as some one has raised a question that since it is taking interPhaseChangeFoam therefore it is complaining about the div(((rho*nuEff)*dev2(T(grad(U))))) term. I am not sure if there is some conflict within these two (turbinesFoam and olaFlow) or swak4Foam/glovy boundary condition, so could you please let me know how to uninstall it. Could I ask you to in addition to the wmake file could you also place something wclean file so that we could uninstall it conveniently.
chandra shekhar pant is offline   Reply With Quote

Old   July 15, 2020, 04:51
Default
  #251
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Scott,
the models were prepared for previous OpenFOAM versions and it seems that changes in the new version have broken them. I will try to find some time soon to update them.

Hi Sergio,
it seems like it was not as easy as making the models to compile in the first place. From what I see in your post the dimensions are not consistent, the second term is multiplied by density (or the first term is not), so I would need to find the time to go over the code and see what may be going on.

Hi Chandra,
from your post, although you are not providing enough information, I think that you are facing multiple separate problems. Let me start by saying that olaFlow is totally independent and has no conflicts with any other components because it creates its own libraries and solvers, therefore I think that what you are experiencing is caused by how you have defined your cases.



I suggest that when you work creating new cases you start with one step at a time. Then you will be able to troubleshoot and know where the error comes from. It is not so clear from your explanation which tutorial or solver you are using, but if you get waves in your simulation is because you have set the boundary conditions in the 0 folder. If you don't want waves, just change the boundary conditions and they will be gone.


I have never worked with interPhaseChangeFoam, so I cannot help you on whether the BCs are applicable to it, but it would be great if you reported back if so.



If you want to delete olaFlow, then go to $FOAM_USER_APPBIN and delete the solver olaFlow and olaDyMFlow and to $FOAM_USER_LIBBIN and delete the libraries libwaveAbsorption.so and libwaveGeneration.so


Best,
Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   July 15, 2020, 05:24
Default
  #252
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Hello Pablo,
Thanks a lot for your help and prompt reply. Sorry regarding the issue with "interPhaseChangeFoam" it was my mistake, since I hard coded it in the script and every time I ran it, it was automatically running it using the "interPhaseChangeFoam" instead of any changes in the controlDic. Sorry again, it was a terrible mistake by me.

Frankly speaking, I was trying to run the turbinesFoam with the cavitation model but was not able to do that, then I thought of giving a try to olaFoam. I am assuming that olaFoam have the capability to include the phaseChange/cavitation ? As of now I am trying it, but not able to get the cavitation, not sure if the flow itself have no cavitation or I am not able to do it correctly. Do you know some case/condition where the flow will produce cavitation? Could you please suggest something in this regard?

Thanks again for your time and help.
chandra shekhar pant is offline   Reply With Quote

Old   July 15, 2020, 06:59
Default
  #253
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Chandra,
unfortunately your assumption is wrong, olaFlow is derived from interFoam, so it does not account for phase change/cavitation. Since that is not my field I cannot be of help either.
I am also not familiar with turbinesFoam, but if their description in Github is accurate and it is indeed compatible with interFoam it should also be compatible with olaFlow. As of how to set it up, I cannot be of help either, since I have never done it myself.
If you have specific questions regarding interPhaseChangeFoam or turbinesFoam, I suggest that you open a thread because it will get more visibility and some other users may be able to help you.

Best,
Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   July 15, 2020, 07:40
Default
  #254
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Thanks Pablo for the clarifications, yes turbinesFoam is working fine with the olaFoam or vice-versa. Thanks again for the detailed and in depth explanation.
chandra shekhar pant is offline   Reply With Quote

Old   July 15, 2020, 10:20
Default
  #255
New Member
 
Sergio Croquer
Join Date: Jan 2011
Posts: 15
Rep Power: 15
sercro is on a distinguished road
Quote:
Originally Posted by Phicau View Post

Hi Sergio,
it seems like it was not as easy as making the models to compile in the first place. From what I see in your post the dimensions are not consistent, the second term is multiplied by density (or the first term is not), so I would need to find the time to go over the code and see what may be going on.
Hello Pablo. Perhaps OF uses a different variable formulation in the compressible solvers? (i.e. rhoU instead of U or rhoE instead of E) and this should be updated in the compressible version of the turbulence models? (just a wild guess).

No rush,

regards,
sercro is offline   Reply With Quote

Old   July 29, 2020, 03:56
Default Questions about added mass coefficient c and boundary conditions in 3D cases.
  #256
Member
 
Haoran Zhou
Join Date: Nov 2019
Posts: 49
Rep Power: 6
Stan Zhou is on a distinguished road
Hi Pablo,

For the added mass coefficient c, van Gent gives an extended equation and c is calculated by the equation c= <gamma> (1-n)/n. In this equation, <gamma> is an empirical coefficient which is given the value 0.34. However, in del Jesus's article, c is proven to be of little importance in most cases (but it's strange that I didn't find the actual words illustrating that c is not important in del Jesus's phD thesis) and c=0.34 is adopted in olaFlow. So, I wonder whether the parameter c in porosityDict is the added mass coefficient c or the <gamma> in the equation c= <gamma> (1-n)/n? If the c in porosityDict is the added mass coefficient in the momentum conservation eqaution, then it means that the c used in olaFlow is not calculated by the equation c= <gamma> (1-n)/n but given a constant value, right?

By the way, in https://olaflow.github.io/numerical-...model-physics/, I found there is a new term 'F_i^ST' in the momentum conservation equation solved by olaFlow, what is the meaning of this term?

Meanwhile, I also have a question about the boundary condition for 3D cases. In the breakwater tutorial, the front and back patches are defined as 'empty' as it's a 2D case. If I want to simulate a breakwater case in 3D, should I define the front and back patches as 'symmetry', 'symmetryPlane' or any other boundary conditions ?

Best regards,

Stan
Stan Zhou is offline   Reply With Quote

Old   July 31, 2020, 15:54
Default Irregular waves simulation
  #257
tcl
New Member
 
Tomas Cuevas
Join Date: Feb 2019
Posts: 4
Rep Power: 7
tcl is on a distinguished road
Hi Pablo

First of all thanks for sharing your work and for the contributions in the forum!

I'm quite new with OpenFOAM. I want to reproduce the overtopping measured on a breakwater physical model (2D wave flume).

I started running olaFlow with regular waves considering the breakwater and it works fine. Now I'm trying to simulate a one-directional irregular sea state, but I decided to start with a simple mesh.

I'm using the baseWaveFlume example as a base. I create a time series of surface elevation using a jonwsap spectrum for the same wave parameters of the baseWaveFlume case (hm0s = 0.1 and tp = 3s) and the using a Fourier transform to get the wave components. All the detail of this is on a jupyter notebook on the preProcessing folder of my case (attached).

When I ran olaFlow, it crash and I get the message:
--> FOAM FATAL ERROR:
Check wave height values.

I checked the wave components of the irreg45degTank tutorial and the plot of the wave heights does not look like as a typical 1d wave spectra. Do you have a document with a more detailed explanation about how to run olaFlow with irregular waves or can you please give any advice or comments?

I have a question about postprocessing. Is there a direct way to obtain overtopping or the flow through a section? I'm doing it using python with the code you have in the breakwater tutorial, with the water level and the depth averaged velocity over the structure.

Best regards!
Tomas
Attached Files
File Type: zip baseWaveFlume_irreg.zip (140.2 KB, 15 views)
tcl is offline   Reply With Quote

Old   August 2, 2020, 17:30
Default
  #258
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Stan,
yes, in olaFlow c is usually fixed to 0.34. It would be very easy to modify the code to add the factor that depends on porosity.
That term is Surface Tension.
The BC depends on what is your setup: no-slip wall, free-slip wall (equivalent to symmetry AFAIK) or cyclic.


Hi Tomás,
the problem is that linux is case sensitive and your variable names start with a capital letter. Please use the same names as in the example on olaFlow's reference folder.
irreg45degTank is a 3D spectrum which should be very similar to the one shown in my paper "Realistic Wave Generation and Active Wave Absorption for Navier-*Stokes Models. Application to OpenFOAM®".
Regarding overtopping, it is easy to extend the python scripts provided to calculate it. We normally distribute such additional scripts as part of the olaFlow training course. Perhaps in the future I will find time and include them as part of the public distribution.


Hi All,
olaFlow is now fully compatible with the latest versions of OpenFOAM (8 & v2006).


Best,
Pablo
__________________
Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   August 3, 2020, 08:22
Default
  #259
tcl
New Member
 
Tomas Cuevas
Join Date: Feb 2019
Posts: 4
Rep Power: 7
tcl is on a distinguished road
Hi Pablo,

Thnaks for your answer. The case is running now.

Where can I find more info about the training courses? Do you have plans to do one in the near future?

Best regards
Tomás
tcl is offline   Reply With Quote

Old   August 3, 2020, 10:20
Default Probleme with overset + pistonWaveMaker
  #260
New Member
 
Paul Tournant
Join Date: Feb 2019
Location: Le Havre, France
Posts: 5
Rep Power: 7
PoloLaccro is on a distinguished road
Hello all,

I am trying to produce a simulation of a wave flume closed by a reflecting wall. I would like produce wave generation equipped by an active absorption system. In this flume there are a buoy. In view of the large amplitudes to which the buoy can be subjected, I decided to use the overset function for its movement.
I decided to use the overOlaDyMFlow solver with its wave-generating piston function with active absorption system.
I have made a test case that works, but I have a problem. When the piston generates waves, only the first cells of the mesh moves. It looks like the problem is with writing the dynamicMeshDict file, but I couldn't find any writing that could properly couple the overset function with mesh movement.
Do you have any idea to couple the compression of the main mesh to generate the swell as well as the movement of the overset left free?
I am using the v1912 version of OpenFOAM

I attach you the test case in question.
Thanks for your help.
have a nice day.


Paul.
Attached Files
File Type: gz waveMakerPlanOverset_7.tar.gz (14.9 KB, 6 views)

Last edited by PoloLaccro; August 4, 2020 at 04:52.
PoloLaccro is offline   Reply With Quote

Reply

Tags
olaflow, 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 13:41.