Release of a Wave Generation and Absorption Toolbox for OF
Dear Co-Foamers,
It is my sincere pleasure finally to be able to announce the release of my wave generation and absorption toolbox (waves2Foam). It has been released through the OpenFoam-Extend SVN on SourceForge. All relevant information is available on the following Wiki including download and installation instructions: http://openfoamwiki.net/index.php/Contrib/waves2Foam The Wiki also contains discussions on (i) future work, (ii) to-do's, and (iii) general use. Please do not hesitate to alter the Wiki, if some informations are ambiguous or completely missing. I sincerely hope that you will find the work relevant and that you will be so kind as to make proper referencing to our journal article, on which details can also be found on the Wiki. Kind regards, Niels [Moderator note: Any and all support questions should be asked on the dedicated prefix [waves2Foam] on the sub-forum OpenFOAM Community Contributions.] |
Good evening to you all,
The repository has been updated with a 1.7.1 compatible solver, the Allwmake script has been slightly modified, and the tutorials have been modified to accommodate to the name change of the pressure. Kind regards, Niels |
Dear all,
There has been some problems using waves2Foam on more recents versions of OF (> 1.7.1), since they changed from Code:
mathematicalConstant::pi Code:
constant::mathematical::pi Code:
PI_(4.0 * atan(1.0) ) Furthermore, since I myself is not running 2.0+ versions, I have added a 9 short step description on how to turn interFoam into waveFoam on the wiki (http://openfoamwiki.net/index.php/Contrib/waves2Foam). Kind regards, Niels |
Good evening to all,
I have changed the target for the library and solvers to FOAM_USER_APPBIN/FOAM_USER_LIBBIN, so if you make a fresh svn update, then remember to delete the libraries and solvers from waves2Foam placed in FOAM_ABBIN and FOAM_LIBBIN. In the latter delete "libwaves2Foam.so" and in the latter, delete "waveFoam", "setWaveField", "setWaveParameters" and "relaxationZoneLayout". This change should ease the compilation on clusters and on OF-installations, which are placed in the root. Kind regards, Niels |
Dear all,
This thread has morphed into a pure technical thread rather than a means of announcements related to waves2Foam. Therefore, any future post besides actual announcements are referred to the following thread: http://www.cfd-online.com/Forums/ope...tml#post355762 As a consequence, no post will be answered in this thread. I sincerely appreciate your corporation, Niels [Moderator note: the aforementioned "technical" posts have been all moved to the indicated thread: http://www.cfd-online.com/Forums/ope...ed-topics.html - which is why the link above will jump to post #83 ;) ] |
Dear all,
I have just released a new post-processing utility within waves2Foam. It is called surfaceElevation and performs a sampling and integration along pre-defined lines. It can be used to extract the surface elevation. Please see the wiki (http://openfoamwiki.net/index.php/Co...ost-processing) for more information. There are some unanswered questions with respect to version 2.1, since I need to get one of my colleagues to perform the test, thus if any of you are successful/have problems, please report your finding in http://www.cfd-online.com/Forums/ope...ed-topics.html. With the addition of this utility, waves2Foam is no longer supported under version 1.5. Compatibility can be sustained, if all parts related to the sampling are removed from waves2Foam/src/Make/files. Kind regards, Niels |
Update of waves2Foam
Dear all,
I have today committed an update of waves2Foam. It contains the following additions: 1. runTime selection of relaxation zone weight. Currently 3 different weights are available. The original exponential weight is kept as default. 2. Additional choice of performing a correction to the relaxation zone weight, so the relaxation zone weight become dependent on the local Courant number. Note: This has not been tested in the current framework, however, it should make the reflection coefficients from outlet boundaries more indenpendent on the mesh resolution in the relaxation zone. 3. Small update to the pre-processing utility relaxationZoneLayout, so it gives an additional output field. 4. Added the interface for the numerical beach implementation into UEqn.H in the solver directories, however, still only a dummy beach is implemented, so it does not actually give any contributions to the momentum equation. 5. Added support for topological changes using e.g. mesh refinement. This is solely based on requesting whether mesh.changing() returns true. Details are stated on an updated Wiki. Furthermore, I seen several presentations lately, where waves2Foam has been applied, which is immensely gratifying. Nonetheless, I would appreciate if you would be so kind as to cite our journal article (see the wiki under "Referencing") rather than my PhD-thesis, as all of the authors will then be given proper acknowledgement. Have fun, Niels |
Good day to all,
The tutorials in the svn-repository has now been updated, so they can be executed directly in OF2.1 without the need to modify fvSolution and fvSchemes. We are still looking into the compilation of waveFoam on 2.1.X, as it seems that a 2.1.1. version does not compile on 2.1, so you are kindly asked to modify your own version of interFoam in your own 2.1 distribtution until further notice. Thanks to Kevin Smith for sending me the needed modification to the tutorials. All the best, Niels |
Hello,
I have today changed the pre-processor statements, so it uses 211 and 160 rather than 21 and 16 in the statements. Furthermore, I have removed all pre-processor statements related to OF v. 1.5, since it has not been supported since svn commit 1950; I had merely forgotten to clean up the source code. This has also significantly reduced the number of pre-processor statements from 20-30 to only 2. In case of any problem, please let me known. Kind regards, Niels |
Good evening to you all,
Today, I have made a somewhat large release. This release contains the following changes: 1. A waveFoam solver for versions 2.1.0 and 2.1.1 is added to the repository. 2. All relevant header files are updated with the correct referencing details on the journal article forming the basis for this release. 3. An *svg figure is added in the doc section. This in the original on the wiki, and it will be updated to the latest release point, when I find the time. 4. Due to some problems with the input format for irregular waves in OF2.0 and OF2.1, when running in parallel, I have re-implemented the entire setWaveParameters/setWaveProperties. The main differences are - Now, the fields for irregular waves are written directly in waveProperties in stead of having them as seperate files. The reading of these seperate files was the reason for crashes in parallel. - Only the parameters needed for a particular waveTheory is kept in the waveProperties file upon completion of setWaveParameters. Also, all comments are removed. It should be noted that the Wiki has not been updated with the latest information, so the best way of understanding what happens is to read the error messages. Generally, all information for running setWaveParameters with a given wave are now needed at the point of setting the wave parameters due to the way waveProperties is constructed. This is slightly different from before, where some parameters could be added after, e.g. phi. I hope that you find these changes useful. Kind regards, Niels |
Dear all,
I have been made aware that there is a problem in compiling setWaveParameters on versions more recent than 1.6. I have corrected the bug and made an svn-commit. (resolved using a pre-processor statement). In addition to this I have tidied the code up a bit with some missing header stuff. Furthermore, the waveProperties file is now much nicer to look at after using setWaveParameters, however, that is purely cosmetic. The wiki has been updated to fit the new requirements of setWaveParameters. Only wave theory still missing a properties-file is streamFunction. Kind regards, Niels |
Dear all,
I have today submitted a couple of changes to the setWaveParameters and setWaveProperties group of files. The changes group into two: 1. Now, the setWaveParameters read the input data from waveProperties.input and write the data to waveProperties. This should resolve previously reported problems with the "mv"-command. 2. The utility setWaveParameters is now independent on fvMesh. This means that all setWaveProperties-files and derived classes have lost this object in the constructors, and it is replaced by the Time object. This small change has decreased the execution time considerably. On the tutorial "3Dwaves" (only 235k cells), the execution time changed by a factor of 40. This can potentially for very large cases make it possible to execute setWaveParameters on a serial computer, which previously could have proven impossible due to e.g. lack of available memory. The Allrun-scripts in the affected tutorials has been corrected. Have a nice weekend, Niels |
Good day,
Two additional wave theories have been added to the repository. These are: 1. A second order bi-chromatic theory with super- and sub-harmonics. 2. A modulation to the surface elevation for a second order stokes wave theory. This is not necessarily completely correct theoretically, but as long as the modulation is small and the period of the modulation is large compared to the wave period, it should work. Secondly, information on the numerical beach is no longer needed in the relaxationZone definition. It now has a default value defined as the empty (and only) numerical beach type. Kind regards, Niels |
Good morning,
Thanks to Michele Rattin I have been made aware that the surfaceElevation utility is bugged. On moving meshes the logged surface elevation differs between the one computed during runTime and the one computed as a post-processing step. For static meshes these two approaches give the same result (within the accuracy of the written alpha1-field). This bug is still unresolved, as I have not found the cause for this discrepancy. Any help is obviously most appreciated. Kind regards, Niels |
Dear all,
I have made the necessary modifications to waves2Foam for it to be compilable on OF220. The source code can be found on this static snapshot until the svn is working again: http://www.student.dtu.dk/~ngja/waves2Foam.tar.gz Please note, that the solver waveFoam is not yet added. Until further notice please follow the guide on the following Wiki-page: http://openfoamwiki.net/index.php/Contrib/waves2Foam Kind regards Niels P.S. The main compilations issues were related to the sampling utility. I have not yet been going through the source code in details to evaluate, whether the sampling problem mentioned above is resolved in OF220. The sampling utility in waves2Foam still relies on an older version. |
runtime sampling bug for moving mesh cases
Dear Niels,
today I checked if the sampling (contained in the upstream "sets" functionObject) bug was solved, but it is still open. Interesting to notice in the test-case I provided to replicate the problem, instead of outputting wrong results, the sampling request causes a crash of the OF2.2 solver. See: http://www.openfoam.org/mantisbt/view.php?id=698 Regards, Michele |
Thanks for testing it. I will hang on to the old version then, and not adopting the new development until it works correctly.
All the best, Niels |
Hi Niels,
just to inform you that the sampledSets bug has been fixed for the 2.2.x version (in commit cd124e9745ad9a8b8404c35c643bd21edb25dfeb). Now also the sampledSurfaceElevation may be updated accordingly. Kind regards Michele |
Great! Thanks for telling me. I will take a look on correcting it as soon as I have the time.
- Niels |
Hello,
I have put a new tar on www.student.dtu.dk/~ngja/waves2Foam.tar.gz, which has better support for 2.2, namely with the addition of a solver. Furthermore, I have corrected a small bug in the Allwmake scripts, which did not allow for the compilation on 2.1.1. Furthermore, I have changed the compilation procedure a bit, so there are a some soft links to the Make/options files throughout, since different options are needed on different version/branches of the OF-development. I have tested the compilation of OF-1.6-ext and OF-2.2.0, and both are compiling nicely. In addition to this, Kevin Maki made the suggestion of adding a warning, if you are using setWaveFields with a ramping time, Tsoft, different from 0. This is also added in the new tar. Hopefully, the SVN will soon be up and running. Kind regards Niels |
Good morning,
I have put a new version of waves2Foam here: www.student.dtu.dk/~ngja/waves2Foam.tar.gz The only difference with respect to previous versions is an additional tutorial, which follows the experiment by Beji and Battjes. Thanks to Jorge Gadelho for providing the basis for this tutorial. The tutorial is distributed along with experimental data in order to use the case for validation. Kind regards Niels |
Dear all,
It is a great pleasure and relief to be able to say that the SVN for waves2Foam is now again fully operational. The checkout installations are changed, so if you what to relocate the SVN-repository please follow the instructions given here: http://openfoamwiki.net/index.php/Of...e_Repositories Otherwise, if you just want the most recent checkout of the svn, do a fresh checkout following the instructions on the wiki for waves2Foam: http://openfoamwiki.net/index.php/Co...on_SourceForge In order to celebrate the reinstatement of the SVN, I will probably recast the compilation procedure a bit in the coming days (inspired by Dennis Kingsley) and perhaps an additional tutorial case is also on its way. Have a nice weekend, Niels |
Dear all,
I have had a chance to update the compilation system, so it is now committed as revision 1996. All environmental variables are now set in the file Code:
$WAVES_DIR/bin/bashrc Code:
$WAVES_DIR/Allwmake Code:
bin/bashrc.org If you know that the settings in bashrc.org are wrong before even beginning on the compilation, then perform the first compilation as follows from the waves2Foam directory: Code:
(cd bin; cp bashrc.org bashrc; chmod a+x bashrc) Also note that I have chosen to make a small change in the part, where the compilation of the solver(s) take place. In order to prepare for e.g. waveDyMFoam the compilation is like this: Code:
solvers=`ls -d $WAVES_SOL/*` I sincerely hope that the new structure will make life easier for those running with settings, which deviate from the previous standard choices/paths/etc. Kind regards Niels P.S. Here is posted the setting, which are distributed in the bashrc.org file, so you can orient yourself before checking out: Code:
#!/bin/bash |
Dear all,
Today a large change has occured to the waves2Foam distribution. 1. I have restructured the src-directory (revision 2004-2006, which will not compile). 2. The restructuring is such that now three libraries are compiled instead of one. These libraries are libwaves2Foam.so, libwaves2FoamProcessing.so and libwaves2FoamSampling.so. 3. Especially the processing library comes with a considerable increase in source code, since a lot of pre- and post-processing utilities are now directly implemented into the OF-source. The additional utilities are: - faceSetToSTL (a simple utility to create an STL surface, see bejiBattjes tutorial). - waveGaugesNProbes (utility to create wave gauges and probes (the latter prepared but not implemented). The location of the wave gauges are exported to VTK-format for easy visualisation in paraFoam, see waveFlume tutorial) - runTime sampling of overtopping (no tutorial yet) - postProcessingWaves (utility to analyse the sampled data sets; special emphasis on free surface wave dynamics, but it can be used on other type of applications, as e.g. FFT on forces are supported. See waveFlume tutorial). The Wiki has not been updated yet, but I will try to make it happen as soon as possible, however, I hope that you will enjoy the extension until then. Practical information: - The bashrc file in waves2Foam/bin has not been affected. Users can continue to use their local settings as is. - The release is revision number 2007. - Compilation of the sampling utilities on 2.2.x. will still crash, since I have not had the time to look into it. This will also affect the compilation of the application "waveFoam" and the utility "surfaceElevation". Kind regards Niels |
Good morning,
Now, waves2Foam also compiles under the most recent release: OF2.2.1. Kind regards Niels Edit: On the Wiki, I have added a long (yet not complete) description of the postProcessWaves2Foam utility. Please see here for details on its use: http://openfoamwiki.net/index.php/Co...cessWaves2Foam |
Dear all,
You might have noticed the releases on the Wiki, which states updating to standard OpenFoam coding style. I am updating the coding style, such that it at least on the broad perspective is compatible with: http://www.openfoam.org/contrib/code-style.php Please bear with me for a couple more commits, as I prefer committing secure code style update a little by little, as I estimate to have corrected some 4000 lines at the end of the style adjustment. Kind regards and enjoy your summer, Niels |
Dear all,
It is my pleasure to announce an expansion of the waves2Foam framework. It has now been added the functionality of porous media, such that practical coastal engineering problems can be considered. The following additions have been made to solvers/libraries:
A solver (porousWaveFoam) has been delivered along with the svn-commit for versions 1.6, 2.1.0, 2.1.1, 2.2.0 and 2.2.1. Furthermore, a single tutorial has been released (more to come in 2014) in the folder tutorials/porousWaveFoam/porousDamBreak. As the name indicates, this is the classical dambreak example with a porous block in the middle. This tutorial will be extended to an actual validation case in 2014 as soon as I have the experimental data. The mathematical formulation and the calibration of the resistance coefficients have been described in the work lead authored by Bjarne Jensen (TU Denmark): Code:
@article{Jensen2014, Compilation of the additional pieces of code has been verified on the OpenFoam versions mentioned above. Any questions one the compilation/use of waves2Foam should be placed in this thread: http://www.cfd-online.com/Forums/ope...ed-topics.html Please note that the porous zones are based on a static cellZone, i.e. moving the computational mesh will result in a reshaping of the porous zone. Therefore, it is not recommended to extend porousWaveFoam to a dynamic version without considerable alteration to the source code. Also note that the Wiki has not been updated following this commit, however, the tutorial(s) will give the needed information on the coupling with the porous zones. Kind regards, Niels References: Engelund, F. (1954). On the laminar and turbulent flows of ground water through homogeneous sand. Technical report. Danish Academy of Technical Sciences. van Gent, M.R.A. (1995). Wave interaction with permeable coastal structures. Ph.D. thesis, Delft University. |
Dear all,
A small note with respect to the compatibility of waves2Foam with the new foam-extend-3.0. I have today painlessly installed foam-extend-3.0, however, it will take some time before the repository is updated with a compatible version of waves2Foam; mainly (solely?) due to cross-version compatibility issues. Kind regards, Niels |
Dear all,
The waves2Foam libraries and utilities are now also compatible with foam-extend-3.0. There is, however, not any solver in the release, because the way the pimple-loop is constructed deviates from previous versions, so I will have to do some experimentation on how and where to enforce the relaxation. But since the libraries are compilable, feel free to toy around. Kind regards Niels |
Hallo again,
For all of you, who are trying to compile waves2Foam revision 2026 (or newer), please note that you must delete bin/bashrc, such that the compile script can substitute with an updated bin/bashrc.org. I was forced to include some new compile flags in order to get things running for both foam-extend-3.0 and the older versions of OpenFoam, standard and ext versions alike. Kind regards, Niels |
Dear all,
I have now managed to get waves2Foam compiled under 2.3. Several naming changes has been introduced with OF2.3, which means that none of the tutorials are currently running. I will try to resolve this issue as soon as possible. The following other changes have also been added to the most recent revision: 1. It is no longer necessary to give the name of the pressure field in waveProperties. 2. The experimental data has been added to the tutorial porousDamBreak along with a matlab script, which makes a comparison between measured and computed surface elevation. I would like to thank Kevin Maki, whose help made the adjustments to OF2.3 easier. Kind regards, Niels |
Good evening,
The tutorials are now updated to run under 2.3. As you will experience, I have completely altered the structure, such that cross-version compatibility files are being hidden away. Because of the introduction of the files src/waves2Foam/include/crossVersionCompatibility.[C,H], the name of the pressure field is no longer needed in waveProperties. This means that all the various versions of waveProperties.*, which cluttered the constant-folders, have been removed. Because of the change in alpha-name and structure of the transportProperties, a new folder has been introduced, which is called tutorials/commenFiles. This contains the two relevant versions of transportProperties, and these are used in all tutorials. In every single <case>/system the folder fvFiles has been created. This contains fvSchemes-files and fvSolution-files fitted to the various versions. Finally, bin/prepareCase.sh has been given an update and old/redundant *.org fields has been cleared out of the tutorial cases. Kind regards, Niels |
Good evening,
It turned out that I had forgotten one element in the transformation in the tutorials. Please update your svn repositories, if you are running under revision 2037 or 2038. Kind regards, Niels |
Hallo,
This is merely a small service announcement that the svn-repository has been updated (revision 2041). There is, however, at this point no functional change in executing waves2Foam, and it does not carry any bug-fixes. The log in the svn-repository states this: Code:
Release to facilitate planned future open-source contribution(s) [No functional change in execution]. I hope to be able to tell more about this coming and quite exciting extension of waves2Foam within not too long. Kind regards, Niels |
Good evening all,
I have just committed a new revision of waves2Foam (revision 2044). Besides a couple of cross-version related bug-fixes, there are also the following additions:
With respect to the previous announced additional contribution, we are currently having some issues with non-GPL software used in the contribution, and we are trying to figure out, how this can either be (i) omitted or (ii) incorporated in a future release. Kind regards, Niels |
Good morning,
There is now a bug-reporting section on https://sourceforge.net/apps/mantisbt/openfoam-extend for waves2Foam related issues. Please do use this in the future for the reporting of bugs, as it will make the handling of these more smooth than today. This bug-reporting system is not intended to be used for compilation issues of unsupported versions of OF. Supported versions are found here: http://openfoamwiki.net/index.php/Co...Versions_of_OF Note, that *.x versions are only supported, if it is explicitly stated in the above list. Kind regards, Niels |
Good afternoon,
waves2Foam does now compile on foam-extend-3.1, and I have for convenience also copied the solvers compatible with OF2.2.1 to OF2.2.2. (no modifications needed), but it will ease the installation for those of you, who runs of that particular OF-platform. Kind regards, Niels |
Good morning,
This morning I have made a commit to the waves2Foam repository. This commit contains a modification of the porous part of the source code and derived modifications to the solvers. The modification is that the definition of the porous structure is now runTime selectable. This is chosen to ease testing of various approaches for the porosity module. Currently, only one porous method is available and it is unchanged in functionality compared to previous commits. In order to use a porous module the user now needs to specify the following in waveProperties.input (setWaveParameters takes care of writing the keyword to waveProperties): Code:
porosityModel jensenJacobsenChristensen2014; Unfortunately, it is not possible to define this keyword in porosityZones - which would have been the logical choice - because of the way the porosity properties are being read. Kind regards, Niels |
Good morning,
I have now committed a bug-fix for the surfaceElevation-tool. This resolves the malfunctioning of this tool, when it is used in runTime on moving meshes. See revision 2064 on the Wiki-page: http://openfoamwiki.net/index.php/Co..._.28History.29 Kind regards, Niels |
Dear all,
I have now streamlined the code in setWaveProperties related to irregular waves (as of revision 2066). This means that I have removed code duplication, but also that the interface for irregular waves is slightly changed. Instead of the old interface, it is now necessary to add the following subDict to the waveProperties dictionary, e.g. immediately prior to the definition of the relaxation zone: Code:
frequencyAxis The flag Code:
discretisation equidistantFrequencyAxis; Code:
equidistantFrequencyAxis on; Code:
discretisation cosineStretchedFrequencyAxis; Code:
equidistantFrequencyAxis off; Kind regards, Niels |
All times are GMT -4. The time now is 11:04. |