Difference between revisions of "Contrib/OLAFOAM"

From OpenFOAMWiki
m (5.0.0 -> 5.0)
(Deleting page not working)
Line 1: Line 1:
[https://sites.google.com/site/olafoamcfd OLAFOAM] is a new numerical model from the creator and developer of IHFOAM. Branched from IHFOAM, this free and open source project is committed to bringing the latest advances in the simulation of wave dynamics to the OpenFOAM and FOAM-extend communities.
+
This project has been discontinued and is now called [https://openfoamwiki.net/index.php/Contrib/olaFlow olaFlow]
 
+
OLAFOAM is a set of solvers and boundary conditions to generate and absorb water waves actively at the boundaries and to simulate their interaction with porous coastal structures.
+
 
+
The main scope of these modelling tools is coastal, marine, hydraulic and offshore engineering.
+
 
+
UNDER CONSTRUCTION
+
 
+
<noinclude>
+
[[Category:FeaturedArticle]]
+
== OLAFOAM Overview ==
+
The OLAFOAM package includes:
+
* Individual boundary conditions for wave generation and active wave absorption for alpha1 and U fields. (libwaveGeneration.so)
+
** '''waveAlpha'''
+
** '''waveVelocity'''
+
* Boundary conditions for pure wave absorption applicable to U field. Based on 2D or 3D theories, both are applicable to 3D cases. (libwaveAbsorption.so)
+
** '''2DWaveAbsorptionVelocity'''
+
** '''3DWaveAbsorptionVelocity'''
+
* Boundary condition for wave generation and active wave absorption using a piston wavemaker, with any number of paddles. (libmultiPistonMovement.so)
+
** '''multiPistonMovement'''
+
* Solvers to be used with your favourite version of OpenFOAM or FOAM-extend. See compatibility below.
+
** '''olaFoam'''
+
** '''olaDyMFoam'''
+
* Brief reference manual
+
* Tutorials and validation cases
+
 
+
=== About OLAFOAM solvers ===
+
olaFoam and olaDyMFoam solve two-phase incompressible flows within porous media by means of the VARANS (Volume-Averaged Reynolds-Averaged Navier-Stokes) equations. More information will be added, in the mean time check the [[#References_and_Citing | references]].
+
 
+
Both solvers are derived from interFoam and interDyMFoam. Furthermore, outside the porous media, the VARANS equations are identical to the classic RANS. Therefore, <u>olaFoam and olaDyMFoam can be used instead of interFoam and interDyMFoam even when the case presents no porous zones.</u>
+
 
+
=== Supported Versions ===
+
{{VersionInfo}}{{Version1.6-ext}}{{Version1.7.1}}{{Version2.1.1}}{{Version2.2.2}}{{Version2.3.0}}{{Version2.4.0}}{{Version3.0.0}}{{Version4.0}}{{Version3.0-ext}}{{Version3.1-ext}}{{Version3.2-ext}}
+
 
+
Known issues:
+
 
+
{{Version1.6-ext}}{{Version3.0-ext}}{{Version3.1-ext}} the boundary conditions compile and everything works.
+
* Running in parallel yields an error.
+
** '''Solution:''' edit $WM_PROJECT_DIR/etc/controlDict and change commsType to nonBlocking. Reference [https://sourceforge.net/p/openfoam-extend/ticketsswak4foam/123/].
+
<pre>
+
[user:PID] *** An error occurred in MPI_Recv
+
[user:PID] *** on communicator MPI_COMM_WORLD
+
[user:PID] *** MPI_ERR_TRUNCATE: message truncated
+
[user:PID] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
+
--------------------------------------------------------------------------
+
</pre>
+
* Running in parallel may produce unexpected results due to a bug in gMin and gMax functions. See [https://sourceforge.net/p/openfoam-extend/ticketsfoamextendrelease/251/]
+
** Fixed with commits c5a2b9d7 (master) and 02833621 (nextRelease).
+
** The '''solution''' can be found [http://www.cfd-online.com/Forums/openfoam-bugs/139466-fe-3-1-parallel-issues-bcs-gmax-reduce.html#post504033 here].
+
 
+
{{Version3.2-ext}} the boundary conditions compile and everything works.
+
* Running in parallel yields an error.
+
** '''Solution:''' edit your case's controlDict and add the following snippet. Reference [http://www.cfd-online.com/Forums/openfoam-programming-development/160288-commstype-foam-extend-3-2-a.html].
+
<pre>
+
OptimisationSwitches
+
{
+
    commsType      nonBlocking;
+
}
+
</pre>
+
 
+
{{Version1.7.1}} everything works when you compile OpenFOAM from source, as there is a problem with the precompiled installable pack. Reference [http://www.cfd-online.com/Forums/openfoam-solving/100091-waves2foam-related-topics.html#post339687].
+
* Otherwise:
+
** The solvers (even the regular version of interFoam) need to include "-linterfaceProperties" to compile.
+
** OLAFOAM solvers compile and work. Despite the BCs being included, apparently they are not linked, as they are not recognized.
+
** If the boundary conditions are included dynamically in controlDict and used with the OLAFOAM solvers, turbulence modelling does not work.
+
 
+
=== Ongoing Development ===
+
* Bug fixes will be issued on a regular basis, while the development of new features is currently ongoing.
+
* New versions may include major changes in the structure of the boundary conditions; however, efforts will be put in minimizing those that will affect the use.
+
 
+
=== References and Citing ===
+
OLAFOAM is the evolution of IHFOAM, a product developed in the frame of a Master and PhD Thesis at the [http://www.ihcantabria.com/en/ Environmental Hydraulics Institute "IH Cantabria"] of the [http://www.unican.es University of Cantabria]. The PhD thesis can be found and downloaded for free here:
+
 
+
[http://www.tesisenred.net/handle/10803/288368 Pablo Higuera PhD Thesis]
+
 
+
If you want to reference the model in your publications it should be called '''OLAFOAM''', and state that is an evolution of IHFOAM, referencing any of the following research papers, in which the IHFOAM implementation, validation and application details are published:
+
 
+
(2015) [http://www.sciencedirect.com/science/article/pii/S0029801815003649 Validation of OpenFOAM® for Oscillating Water Column three-dimensional modeling.]
+
<pre>
+
Validation of OpenFOAM® for Oscillating Water Column three-dimensional modeling.
+
Iturrioz, A., Guanche, R., Lara, J.L., Vidal, C., & Losada, I.J. [2015]
+
Ocean Engineering [Vol. 107, pp. 222-237]
+
http://dx.doi.org/10.1016/j.oceaneng.2015.07.051
+
</pre>
+
 
+
 
+
(2015) [http://www.sciencedirect.com/science/article/pii/S0378383915000113 Tsunami wave interaction with mangrove forests: A 3-D numerical approach.]
+
<pre>
+
Tsunami wave interaction with mangrove forests: A 3-D numerical approach.
+
Maza, M, Lara, J.L., & Losada, I.J. [2015]
+
Coastal Engineering [Vol.98, pp. 33-54]
+
http://dx.doi.org/10.1016/j.oceaneng.2015.07.051
+
</pre>
+
 
+
 
+
(2015) [http://www.sciencedirect.com/science/article/pii/S0378383915000113 Three-dimensional numerical wave generation with moving boundaries.]
+
<pre>
+
Three-dimensional numerical wave generation with moving boundaries.
+
Higuera, P., Losada, I.J. and  Lara, J.L. (2015)
+
Coastal Engineering, Vol. 101, pp. 35–47
+
</pre>
+
 
+
 
+
(2014) [http://dx.doi.org/10.1016/j.coastaleng.2013.09.002 Three-dimensional interaction of waves and porous coastal structures using OpenFOAM. Part II: Application.]
+
<pre>
+
Three-dimensional interaction of waves and porous coastal structures using OpenFOAM. Part II: Application.
+
Higuera, P., Lara, J.L. and Losada, I.J. (2014)
+
Coastal Engineering, Vol. 83, pp. 259–270
+
</pre>
+
 
+
 
+
(2014) [http://dx.doi.org/10.1016/j.coastaleng.2013.08.010 Three-dimensional interaction of waves and porous coastal structures using OpenFOAM. Part I: Formulation and validation.]
+
<pre>
+
Three-dimensional interaction of waves and porous coastal structures using OpenFOAM. Part I: Formulation and validation.
+
Higuera, P., Lara, J.L. and Losada, I.J. (2014)
+
Coastal Engineering, Vol. 83, pp. 243-258
+
</pre>
+
 
+
 
+
(2013) [http://dx.doi.org/10.1016/j.coastaleng.2012.06.002 Simulating coastal engineering processes with OpenFOAM.]
+
<pre>
+
Simulating coastal engineering processes with OpenFOAM.
+
Higuera, P., Lara, J.L. and Losada, I.J. (2013)
+
Coastal Engineering, Vol. 71, pp. 119-134.
+
</pre>
+
 
+
 
+
(2013) [http://dx.doi.org/10.1016/j.coastaleng.2012.07.002 Realistic wave generation and active wave absorption for Navier-Stokes models: Application to OpenFOAM.]
+
<pre>
+
Realistic wave generation and active wave absorption for Navier-Stokes models: Application to OpenFOAM.
+
Higuera, P., Lara, J.L. and Losada, I.J. (2013)
+
Coastal Engineering, Vol. 71, pp. 102-118.
+
</pre>
+
 
+
=== Get Connected ===
+
To submit your feedback, suggestions, bugs... you have many options:
+
* The OLAFOAM e-mail, found [https://sites.google.com/site/olafoamcfd/contact here].
+
* The e-mail found within the source code headers.
+
 
+
 
+
OLAFOAM at cfd-online:
+
* [http://www.cfd-online.com/Forums/openfoam-solving/168699-olafoam-thread.html OLAFOAM Support Thread]
+
 
+
== Source Download and Compilation ==
+
OLAFOAM download site can be found [https://sites.google.com/site/olafoamcfd/source-code here].
+
 
+
=== Source Code Download ===
+
You can find IHFOAM in [https://github.com/phicau/OLAFOAM GitHub], and it can be downloaded in zip format.
+
 
+
For a more convenient download of the source code, run the following command:
+
 
+
<pre>
+
git clone git://github.com/phicau/OLAFOAM.git
+
</pre>
+
 
+
If the git protocol is blocked in your network try either of the following commands:
+
 
+
<pre>
+
git clone https://github.com/phicau/OLAFOAM.git
+
git clone http://github.com/phicau/OLAFOAM.git
+
</pre>
+
 
+
Code updates can be downloaded in the future for the OLAFOAM folder as follows:
+
 
+
<pre>
+
git checkout
+
git pull
+
</pre>
+
 
+
Recompilation is required to apply the changes.
+
 
+
=== Source Code Structure ===
+
OLAFOAM source code is divided in two main folders:
+
* '''genAbs''' --> Generation and absorption boundary conditions
+
** '''waveAbsorption''' --> (BCs)
+
** '''waveGeneration''' --> (BCs)
+
** '''common''' --> Scripts shared by both BCs
+
* '''solvers''' --> Guess what's inside...
+
** '''olaFoamXXXXX''' --> One for each compatible version, including olaFoam and olaDyMFoam
+
 
+
=== Compilation ===
+
Compilation has been automatized and needs to be performed only once. Since OLAFOAM does not require any dependencies, the source code can be downloaded and compiled anywhere on your computer.
+
 
+
Simply run the following script from the OLAFOAM base folder:
+
<pre>
+
./allMake
+
</pre>
+
 
+
You can also compile the boundary conditions or the solvers (olaFoam and olaDyMFoam) independently:
+
 
+
<pre>
+
cd genAbs
+
./allMake
+
 
+
cd solvers/olaFoamXXXXX
+
./allMake
+
</pre>
+
 
+
In this case be sure to select the correct folder for your preferred OpenFOAM/FOAM-extend (OF/FE) version. The currently supported versions have already been [[#Supported_Versions | shown]].
+
 
+
=== Dynamic Linking of the Boundary Conditions ===
+
In order to include the wave generation and active wave absorption boundary conditions without needing to re-compile a solver, write the following code in controlDict:
+
 
+
<pre>
+
libs
+
(
+
    "libwaveGeneration.so"
+
    "libwaveAbsorption.so"
+
);
+
</pre>
+
 
+
== OLAFOAM Usage ==
+
'''IMPORTANT NOTES:'''
+
* OLAFOAM is programmed in such a way that gravity has to act in the negative Z direction.
+
* Currently the X and Y coordinates of each boundary face are substituted by those of the centroid of the paddle to which the face belongs (similarly to what happens in the laboratory). Therefore, to obtain accurate directionality you need several paddles (''nPaddles'' >> 1). Next releases will change the implementation so you can choose.
+
* Angles such as ''waveDir'' and ''absDir'' are measured in degrees with respect to the positive X axis (0º), growing towards the positive Y axis (90º).
+
 
+
=== olaFoam and olaDyMFoam Solvers ===
+
'''IMPORTANT NOTE:'''
+
* OLAFOAM has a slightly different formulation than the one published in the third [[#References_and_Citing | reference]], due to a volume-averaging approach with an ill-posed term. The correct formulation is included in [http://www.tesisenred.net/handle/10803/288368 Pablo Higuera PhD thesis]. The results now, however, are as good as those shown on the validation, but with different friction factors. Check out the tutorials for the dam break validation case. The wrong term slightly changed the results where gradients of porosity appeared (i.e. at the interface between the porous medium and the clear fluid, or between porous media), where not many people measure, as the flow is very dependent on the local effects (the ones that we try to filter out by volume-averaging).
+
 
+
 
+
Porosity is introduced by setting an initial field. It can be done using the ''setFields'' utility, in a similar way to the VOF indicator function (alpha1, alpha.water). This field is called ''porosityIndex'' and it features the index of the porous zone to which each cell belongs.
+
 
+
* If no ''porosityIndex'' field is found, olaFoam is identical to interFoam.
+
* Index 0 represents the clear region, outside any porous medium.
+
* Practical examples can be found in the training materials.
+
 
+
 
+
The porous media properties (i.e. a, b and c friction factors, mean rock size and porosity) are included in '''constant/porosityDict'''
+
 
+
<pre>
+
a              n(0.0 ... );
+
b              n(0.0 ... );
+
c              n(0.0 ... );
+
 
+
D50            n(1.0 ... );
+
porosity        n(1.0 ... );
+
</pre>
+
 
+
* The first values should always be as shown, as they represent the clear flow region.
+
* n is the number of materials.
+
 
+
=== Wave Generation BCs ===
+
To generate waves you have to set the following boundary conditions.
+
 
+
For alpha1/alpha.water:
+
<pre>
+
    inlet
+
    {
+
        type            waveAlpha;
+
        waveDictName    waveDict;
+
        value          uniform 0;
+
    }
+
</pre>
+
 
+
For U:
+
<pre>
+
    inlet
+
    {
+
        type            waveVelocity;
+
        waveDictName    waveDict;
+
        value          uniform (0 0 0);
+
    }
+
</pre>
+
 
+
* The other boundary condition needed is:
+
** ''buoyantPressure'' or ''fixedFluxPressure'' for ''p_rgh''
+
 
+
==== Wave Generation Dictionary ====
+
[[File:IHFOAM_generationOptions.png|thumbnail|400x280px|Wave generation dictionary options]]
+
 
+
* The wave conditions are read from a dictionary file located in the '''constant''' folder.
+
* By default it is named '''waveDict''', however, you can name it differently setting '''waveDictName'''.
+
* This way you can even specify different wave conditions for different patches on your case.
+
 
+
All the options are gathered in the figure on the right. The rectangles indicate the different parameters and the rounded boxes denote the options available. A complete showcase for the different wave theories can be found in the '''reference/waveDict''' folder.
+
 
+
Implemented wave theories:
+
 
+
{| class="wikitable" style="color:black"
+
|-
+
! waveType / waveTheory !! Reference !! Comments
+
|-
+
| regular / StokesI || Dean and Dalrymple (1991) ||
+
|-
+
| regular / StokesII || Dean and Dalrymple (1991) ||
+
|-
+
| regular / StokesV || Skjelbreia and Hendrickson (1960) ||
+
|-
+
| regular / cnoidal || Svendsen (2006) ||
+
|-
+
| regular / streamfunction || Fenton (1988) || No solver programmed. Use Fenton's [http://johndfenton.com/Steady-waves/Fourier.html Fourier solver] (old version tested only, distributed with the materials) to set all the parameters required.
+
|-
+
| solitary / Boussinesq || Lee et al. (1982) ||
+
|-
+
| solitary / Grimshaw || Lee et al. (1982) ||
+
|-
+
| wavemaker / (tx/tv/txeta/tveta) || Own development || waveTheory depending on what you provide: '''t''' (time series), '''x''' (paddle displacement), '''eta''' (free surface elevation). Note that this BC replicates the wavemaker (constant) profile, but it does not move.
+
|-
+
| irregular / () || Dean and Dalrymple (1991) || Linear summation of StokesI components. Second order by Longuet-Higgins and Stewart (1960) completed with Baldock et al. (1996)
+
|}
+
 
+
Active wave absorption can be connected on the wave generation boundary so that waves incident to it flow out while still generating the target waves. If no other boundary is absorbing it sould be connected, to avoid a mean water level increase due to the mass imbalance between crests and troughs.
+
* Controlled by ''genAbs'' bool variable: true/false
+
* Correction velocity applied in the ''absDir'' direction. When not set or set greater than 360, it defaults the perpendicular direction to the boundary. See the first [[#References_and_Citing | reference]] for a complete explanation on when it is convenient to set ''absDir''.
+
* You can select ''nPaddles'' greater than 1 to obtain a better directional absorption.
+
 
+
==== Wave Formulae Form ====
+
All the waves in OLAFOAM are generated in a similar way to the following implementation (Stokes I):
+
 
+
<math>\eta = \frac{H}{2} cos \left( k_x x + k_y y - \omega t + \psi \right)</math>
+
 
+
This means that the free surface elevation (eta) is dependent of the patch location. If you want to keep the phase meaningful I would recommend you to locate the wave generation patch at X = 0, although this is not a must.
+
 
+
=== Wave Absorption BCs ===
+
Why pure active wave absorption conditions when wave generation already includes it? Pure active wave absorption, disregarding wave generation, allows a more sofisticated treatment and better performance.
+
 
+
To absorb waves you have to set the following boundary condition for U. This time no data are read from a dictionary, so everything is set at the boundary condition level. The default values are shown, so the parameters that need no different value can be left out.
+
 
+
2D-theory version, applicable to 2D/3D:
+
<pre>
+
    outlet
+
    {
+
        type            2DWaveAbsorptionVelocity;
+
        nPaddles        1;
+
        nEdgeMin        0;
+
        nEdgeMax        0;
+
        absorptionDir  400;
+
        value          uniform (0 0 0);
+
    }
+
</pre>
+
 
+
* ''absorptionDir'' can be used to obtain Quasi-3D behaviour (see the first [[#References_and_Citing | reference]]). Its default value is greater than 360, so absorption is applied to the perpendicular direction to the patch.
+
 
+
3D-theory version, applicable to 3D:
+
<pre>
+
    outlet
+
    {
+
        type            3DWaveAbsorptionVelocity;
+
        nPaddles        1;
+
        nEdgeMin        0;
+
        nEdgeMax        0;
+
        value          uniform (0 0 0);
+
    }
+
</pre>
+
 
+
The differences between both are explained in the first [[#References_and_Citing | reference]]. If you are unsure whether to use the 2D or 3D version, use the 2D, as its range of applicability is wider.
+
 
+
* The rest of the boundary conditions needed are:
+
** ''zeroGradient'' for ''alpha1''
+
** ''buoyantPressure'' or ''fixedFluxPressure'' for ''p_rgh''
+
 
+
Similarly to wave generation, setting ''nPaddles'' > 1 will allow directional absorption, as each paddles (vertical slices of the patch) absorbs the waves independently. For stability reasons try to keep your paddles approximately 5 cells wide at least.
+
 
+
* The patch is splitted in ''nPaddles'' vertical transects according to its orientation
+
** If it is more perpendicular to the X axis, it uses the Y coordinates to divide the patch in ''nPaddles'' between YMin and YMax. nEdgeMin starts to count from YMin. nEdgeMax starts to count from YMax.
+
** If it is more perpendicular to the Y axis, it uses the X coordinates to divide the patch in ''nPaddles'' between XMin and XMax. nEdgeMin starts to count from XMin. nEdgeMax starts to count from XMax.
+
* ''nEdgeMin'' and ''nEdgeMax'' solve some issues that appear on the corners, selecting a number of paddles that are only capable of taking water out according to the 2D theory.
+
 
+
== OLAFOAM Documentation and Tutorials ==
+
The OLAFOAM documentation and tutorials are included in the Github bundle.
+
 
+
=== Documentation ===
+
A brief reference document is included.
+
 
+
==== FourierFenton ====
+
Old version of Fenton's Fourier program to obtain the input parameters needed to set up streamfunction wave theory.
+
 
+
==== waveDict ====
+
Directory that includes a sample of waveDict file for each supported wave theory.
+
 
+
=== Tutorials ===
+
A set of tutorials, covering the use of olaFoam and the wave generation boundary conditions, is available. All the cases include a ''runCase'' and ''cleanCase''. The first one runs all the steps needed to simulate the case and sampling/validation (when available). The second one resets the case to its initial state (i.e. with a very small size).
+
 
+
The practical cases are as follows.
+
 
+
==== baseWaveFlume ====
+
A simple wave flume (i.e. 2D channel).
+
 
+
* Waves are generated on the left patch (inlet).
+
* Waves are absorbed on the right patch (outlet), according to the 2D theory.
+
* Water depth is set to 0.4 m.
+
* The wave conditions are specified in '''constant/waveDict'''.
+
** Regular waves, 0.1 m high and with 3 s of period are generated according to the cnoidal theory.
+
* No porosity involved.
+
* The case can be run very fast in serial.
+
 
+
==== irreg45degTank ====
+
A more advanced wave case. This is a 3D wave tank with a peculiar shape, similar to the one used in the first [[#References_and_Citing | reference]]. An irregular sea state is generated at patch X = 0, and absorbed elsewhere.
+
 
+
* A directional, irregular sea state is generated (842 wave components).
+
** Note ''nPaddles'' value for directionality
+
* On the rest of the patches, the waves are absorbed according to the 3D theory.
+
** Note also ''nPaddles'', ''nEdgeMin'' and ''nEdgeMin'' values.
+
* No porosity involved.
+
* Case to be better run in parallel. Some [[#Supported_Versions | known issues]] exist for several OpenFOAM and FOAM-extend versions.
+
 
+
==== CR35_dambreak ====
+
A classic benchmark case to validate free surface flow through a porous medium. It is a 2D dam break in a tank.
+
 
+
* Porosity.
+
** Note the ''porosityIndex'' field at the 0 folder.
+
** ''porosityIndex'' is set using ''setFields'', check ''setFieldsDict'' out.
+
** The porous variables are set in '''constant/porosityDict'''.
+
* Validation is included.
+
** Sampling is not needed as free surface is obtained with a function object (included in controlDict).
+
** Requirement: matplotlib (a.k.a. pylab)
+
** A python script (''plotValidation.py'') can be run in the end to plot a comparison between the experimental and numerical data.
+
* The case can be run very fast in serial.
+
 
+
==== breakwater ====
+
A composite breakwater within a wave flume in 2D.
+
 
+
* Porosity.
+
** Note the ''porosityIndex'' field at the 0 folder.
+
** ''porosityIndex'' is set using ''setFields'', check ''setFieldsDict'' out for setting porosity inside STL files.
+
** The porous variables are set in '''constant/porosityDict'''. This time several porous media are included.
+
* Waves are generated in the left patch (inlet)
+
* Waves are absorbed on the right patch (outlet), according to the 2D theory.
+
* Water depth is set to 0.8 m.
+
* The wave conditions are specified in '''constant/waveDict'''.
+
** Regular waves, 0.25 m high and with 3 s of period are generated according to the cnoidal theory.
+
* Samping of free surface elevation and pressure is included.
+
** Requirement: matplotlib (a.k.a. pylab)
+
** Python scripts are included for postprocessing OpenFOAM results: postSens*.py
+
** Python scripts are included for plotting postprocessed results: plotSens*.py
+
* The case can be run very fast in serial.
+
 
+
This case also involves turbulence modelling. In future releases it will include the volume-averaged k-epsilon model.
+
 
+
==== pistonFlumeABS ====
+
A simple wave flume (i.e. 2D channel) where waves are absorbed by a piston wavemaker.
+
 
+
* Waves are generated on the left patch (inlet), .
+
* Waves are absorbed on the right patch (outlet), according to the 2D theory, '''with a moving boundary (piston)'''.
+
* The case runs with olaDyMFoam
+
 
+
==== currentWaveFlume ====
+
A simple wave flume where waves and a current are generated simultaneously.
+
 
+
* Waves and the current are generated on the left patch (inlet).
+
* Waves and the current are absorbed on the right patch (outlet), according to the 2D theory.
+
* You can check the differences with baseWaveFlume to see how to set up the currents:
+
** 0.org/U
+
** constant/waveDict
+
** system/setFieldsDict
+
* The case runs with olaFoam
+
 
+
==== wavemakerFlume ====
+
A simple wave flume where waves are generated either by a piston or a flap wavemaker
+
 
+
* Waves are generated on the left patch (inlet).
+
* Waves are absorbed on the right patch (outlet), according to the 2D theory.
+
* Python scripts included in '''constant''' directory to create wavemaker displacement according to linear theory. Parameters can be modified.
+
** flapWaveGen.py for flap wavemaker.
+
** pistonWaveGen.py for piston wavemaker.
+
* The case runs with olaDyMFoam.
+
** runCaseFlap script for flap wavemaker.
+
** runCasePiston script for piston wavemaker.
+
 
+
==== wavemakerTank ====
+
A simple wave flume where '''oblique''' waves are generated either by a multi-piston or a multi-flap wavemaker (10 individual paddles).
+
 
+
* Waves are generated on the left patch (inlet), '''with 10 individual moving paddles'''.
+
* Waves are absorbed on the right patch (outlet), according to the 2D theory.
+
* Python scripts included in '''constant''' directory to create wavemaker displacement according to linear theory. Parameters can be modified.
+
** flapWaveGen.py for flap wavemaker.
+
** pistonWaveGen.py for piston wavemaker.
+
* The case runs with olaDyMFoam.
+
** runParallelCaseFlap script for flap wavemaker (it will only run in serial in foam-extend).
+
** runParallelCasePiston script for piston wavemaker (it will only run in serial in foam-extend).
+
 
+
== Changelog ==
+
History of the changes in the source code. Slightly more detailed descriptions than in git:
+
 
+
* Sep 11, 2017: Calculate field values correctly when setting fields
+
* Aug 18, 2017: Added olaFoam solvers for OpenFOAM 5.0
+
* Jul 3, 2017: Added solver and cases for compatibility with OpenFOAMv1706+
+
* Jun 27, 2017: Added headers to comply with GNU GPL
+
* May 17, 2017: Extracted reference.zip and fixed a bug in waveTheory.py. Thanks to Marc Batlle Martin!
+
* Mar 22, 2017: Fixed wave phase implementation for regular waves to be consistent with StokesI theory
+
* Feb 28, 2017: Added new solitary wave profile: Grimshaw
+
* Feb 14, 2017: Added olaFoam solvers for OpenFOAM v1612+. Use version 4.0 tutorials.
+
* Feb 10, 2017: Header cosmetics.
+
* Nov 30, 2016: Release of the flap-type wave generation. New tutorials included, only for the latest versions of OpenFOAM and foam-Extend; the latter only run in serial.
+
* Nov 17, 2016: Fixed small glitches. Tutorials cleanCase will not delete the case if polyMesh is not found.
+
* Jul 11, 2016: Added solver for OpenFOAM 1606+. Updated and adapted version 4.0 tutorials to be run with OpenFOAM + versions.
+
* Jun 29, 2016: Added solver for OpenFOAM 4.0. Updated and adapted version 3.0.0 tutorials
+
* Jun 15, 2016: Commented piece of code that caused increasing water level in irregular sea states.
+
* Apr 29, 2016: Added support for simultaneous wave and current generation and absorption. Tutorial currentWaveFlume included for reference. You can check the differences with baseWaveFlume to see how to set up the currents.
+
* Apr 6, 2016:  Simplified compilation process. Added master allMake script in the base folder. Compilation now is automatic requires only one script.
+
* Mar 27, 2016:  Added moving boundary support for Foam-Extend and OpenFOAM 1.6-ext, including tutorials. Now dynamic boundary BC is included in libwaveGeneration.so instead of being standalone.
+
* Mar 26, 2016: Added support for compilation in OpenFOAM v3.0+ . Only changes in the Make files were needed.
+
* Mar 4, 2016: Fixed class name that started with a number and prevented compilation
+
* Mar 2, 2016:  Initial OLAFOAM commit - equivalent to IHFOAM (https://github.com/phicau/IHFOAM) commit afa8fbf07348983d7ddf4710d2489525ed489cdc
+

Revision as of 01:49, 23 January 2018

This project has been discontinued and is now called olaFlow