|
[Sponsors] |
September 3, 2018, 21:53 |
|
#61 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Arash,
it is not that simple, it can certainly be done, but the solver needs to be changed completely. Moreover, probably starting from interFoam is not the best choice, I would use a simpler solver instead. I suggest that you search this forum to learn how to create your own solver and implement your own equations. Best, Pablo |
|
September 4, 2018, 01:43 |
WaveMakerFlume Tutorial
|
#62 |
New Member
dietlind
Join Date: Aug 2018
Posts: 4
Rep Power: 8 |
Dear Pablo,
now that I am using the newer version of OpernFoam, the wavemakerFlume tutorial case works and I am making some changes to use my own data. I am using a 30m long rectangular flume with 0.6m water depth and generate waves using the wavemaker paddle position. The first wave gauge is situated 5m from the paddle, the second one 10m away and in 14.55m distance there is a hanging horizontal plate. When looking at the results, for the first gauge (5m) , the experimental data and the numerical data seem to be similar. However, looking at the next gauge in 10m distance, the numerical wave is much lower than the experimenetal data. In the visualization with paraview I could see that the wave is breaking at some point which did not occur in the experiment. Do you have any suggestion what I changes I could make? I did not change the absorption settings from the tutorial. Do you think that could be a reason? I attached the graphs of gauge 1 and 2. Furthermore I am not sure if I am using the right sampling method for recording the pressure on the horizontal plate (there is no overtopping of the plate, the wave just hits the plate from underneath). I looked at the breakwater tutorial where you used the presssure sampling. If I want to sasmple the pressure on the plate, are the following settings in the sampleDictPres correct? //horizontal plate located at (14.55 -0.01 0.785) to (15.55 -0.01 0.785) interpolationScheme cellPointFace; setFormat raw; surfaceFormat raw; sets ( GaugesP { type patchCloud; //how do I know which type to use? axis xyz; patches 1(platebottom); points ((14.60 -0.01 0.78) (14.60 -0.01 0.785) (14.80 -0.01 0.785) (15.00 -0.01 0.785) (15.20 -0.01 0.785) (15.30 -0.01 0.78) (15.40 -0.01 0.785) (15.50 -0.01 0.785)); maxDistance 100; // what does this mean? } ); surfaces (); fields ( p ); // For OpenFOAM 4.0.0 type sets; libs ("libsampling.so"); Many thanks in advance! Dietlind |
|
September 4, 2018, 02:40 |
|
#63 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Dietlind,
without knowing all the details of the case, I would suggest using: square cells, smaller cell size and smaller Courant number (~0.15). A proper grid convergence test is usually needed to make sure that such nonlinear waves are accurately represented. Regarding sampling, yes, you are using the right setup. patchCloud indicates that you are selecting a cloud of points that are then going to be projected (perpendicularly, minimum distance) onto your surface if they are closer than 100 m (maxDistance). I would suggest smal shifts: (14.60000001 -0.01 0.784)... to ensure that they are inside the mesh and do not coincide with any mesh face. Best, Pablo |
|
September 7, 2018, 02:02 |
WaveMakerFlume Tutorial
|
#64 |
New Member
dietlind
Join Date: Aug 2018
Posts: 4
Rep Power: 8 |
Dear Pablo,
thank you for the explanation. I have one more question concerning this case. When I visualize the case with Paraview it looks like there is some reflection at the outlet. Can you tell me, what boundary conditions (for the parameters in the 0 folder) I should apply for creating an open outflow at the outlet without any absorption or reflection? Kind regards! |
|
September 7, 2018, 05:08 |
|
#65 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Dietlind,
let me refer you to this post: The OLAFOAM Thread If you apply an open outflow condition (the same as at the atmosphere) all your water will flow away, you need the active wave absorption conditions, as you are using. Best, Pablo |
|
September 9, 2018, 06:19 |
|
#66 |
New Member
M.W.G.
Join Date: Sep 2018
Posts: 7
Rep Power: 8 |
Dear Pablo,
First of all, I would like to express my sincere thanks for providing your invaluable contributions. I have gone through your thesis, publications, manual and replies related to wave making and absorption. As I can see, if not mistaken, the active wave absorption boundary condition is intended for shallow water water waves. So my questions are: 1: have you developed deep wave absorption boundary condition yet ? 2: If no, in your opinion what should I do if I am intending to simulate deep water waves ? Thanks in advance, Best Wishes... Mwg. |
|
September 10, 2018, 05:05 |
|
#67 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi MWG,
you're welcome! The underlying assumption for the present implementation of active wave absorption is indeed shallow water water waves. This does not mean that the active wave absorption BC cannot be used outside shallow waters, it means that performance will decrease. It is often true that reflection coefficients for deep waters can be larger than 20%. Right now I am testing a couple of alternatives, keep tuned. Best, Pablo |
|
September 13, 2018, 12:54 |
Solitary wave - time lag
|
#68 |
New Member
Marc Batlle
Join Date: Mar 2017
Posts: 9
Rep Power: 9 |
Dear Pablo,
Congrats for your olaFlow improvements. I am working on solitary waves these days and, for the moment, understanding your implementation in the generation boundaries. As far as I understood from olaFoam reference manual your are choosing a time lag in order not to start generating the wave from the top part of the crest. Your time lag chosen is [3.5/sqrt(H/h)] according to the reference, but when looking at: ~/olaFlow/genAbs/common/waveFun.C , line 1787: ts = waveLength(H, h)/2.0; and, line 1776: 4.0*PII/sqrt(3)*h/sqrt(H/h); I expected to find here this lag. I am not an expert in OpenFOAM and c++; so probably i am looking at the wrong place. I would appreciate some advice. Thanks |
|
September 14, 2018, 04:49 |
|
#69 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Marc,
thanks! You are totally right, after recent changes the reference manual is out of date. I am working in a new version which should be out next year. The new changes were introduced to be consistent between the 3 solitary wave theories implemented: Boussinesq, McCowan and Grimshaw. The space shift is equivalent to half a wavelength, which is different for each theory. They are all defined on the same basis that the free surface starts at an X percentage of H. I think X was 1%, but I would need to double check that . Best, Pablo |
|
September 16, 2018, 04:37 |
|
#70 |
New Member
M.W.G.
Join Date: Sep 2018
Posts: 7
Rep Power: 8 |
Thank you Pablo for the answer.
I have one more if you don't mind. Does the waterDepth entry in the waveDict affect the correction velocity calculation at the pure-absorbing boundary too? I can see from the reference manual that the waveDict only affects the wave-generation boundary, while the absorption-boundary is controlled only from within the U file. In other words, If the waterDepth entry is modified, will the correction-velocity be modified on both generation and absorption boundaries? or will it be modified only on the generation boundary? Best Wishes... M.W.G. |
|
September 16, 2018, 07:21 |
wave profile
|
#71 |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Dear Pablo
how can I plot wave profile in paraview? |
|
September 17, 2018, 06:35 |
|
#72 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi M.W.G.
as far as I remember, waterDepth is not read from the waveDict file neither for the wave generation or absorption BCs. The water depth is measured and set at the first time step. You could in principle change it in the U file, but mind you, I see no reason for a user to set it. Hi Arash, It is true that you can, in principle, sample free surface elevation, store it as a time series and plot as a 2D graph it in ParaView, although I have never done it. I always use other software like python or gnuplot; see the breakwater tutorial for the relevant scripts. Best, Pablo |
|
September 20, 2018, 12:05 |
wave profile
|
#73 |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Dear Pablo
Thank you for your reply. In fact, I could not make a wave profile. I would appreciate it if let me know 1- how can I plot wave profile with Gnuplot in basewaveFlum tutorial 2- installing python is needed for running py script in breakwater example 3- how can I install Python in Ubuntu 4- is it possible just to copy py files in basewaveFlum and how can I run them to have a wave profile |
|
September 21, 2018, 02:12 |
|
#74 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Arash,
you can google most of that questions, since they are not olaFlow-related. Please do your homework and learn how sampling works on the breakwater case. Remember that there is a runCase script with all the steps needed to complete the case, postprocess and plot the results. In the end what you obtain is a file for each gauge with [t eta] in columns, easy to load in any program. Pablo |
|
September 21, 2018, 12:11 |
wave profile
|
#75 | |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Quote:
it is not my homework I think it is better off explaining my issue in details. In fact, after running ./runCaseSST of the breakwater example an error occurred which indicates sample command on line 53 of the script not found. I use OF version6. there is no sample file in opt/openfoam6/platforms/linux.../bin directory. my question is about this error and the failure of the running script. I also looked for the issue on the net but I couldn't find anything. |
||
September 22, 2018, 23:36 |
|
#76 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Arash,
now I see, indeed it is always better to explain the issue with as much details as possible. It seems like sample has been deprecated in version 6. In previous versions you still had a message telling you what to do: Code:
sample has been superseded by the postProcess utility: postProcess -func sample To re-use existing 'sampleDict' files simply add the following entries: type sets; libs ("libsampling.so"); and run postProcess -func sampleDict Best, Pablo |
|
October 3, 2018, 14:06 |
wave profile
|
#77 |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Dear pablo
thank you for your help. I changed what you said in the runcase scripts. However there I two issues 1- Where I have to add type sets; libs ("libsampling.so"); in sampleDicVOF it is added at the end for example. is it correct ? it it is, so the secend issue is important 2- the following error: Traceback (most recent call last): File "postSensVOF.py", line 21, in <module> a = os.listdir('./'+postPath) OSError: [Errno 2] No such file or directory: './postProcessing/sampleDictVOF' Traceback (most recent call last): File "postSensPres.py", line 21, in <module> a = os.listdir('./'+postPath) OSError: [Errno 2] No such file or directory: './postProcessing/sampleDictPres' I have to make this directory and file or it should be created by OF ============= out put of the echo $WM_PROJECT_VERSION goes 6 |
|
October 5, 2018, 05:19 |
|
#78 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Arash,
to learn OpenFOAM you must try and repeat and make mistakes. Run the sampling: Code:
postProcess -func sampleDictVOF Code:
postProcess -func sampleDictVOF Code:
./postSensVOF.py ./plotSensVOF.py Pablo |
|
October 19, 2018, 05:42 |
errors after rebuilding olaflow
|
#79 |
New Member
Weather
Join Date: Apr 2014
Posts: 9
Rep Power: 12 |
I was running many cases on olaFlow without any problems so far. However, as soon as I realized there are some updates, I wanted to download them. I somehow failed with the comment git checkout. I couldn't merge files. So I decided to delete olaflow and re-build it. I did the necessary compilations and it says that it compiled successfully. However, I keep seeing the same error when I run any tutorial in olaflow, starting with "Cannot open mesh description file...". What is this about? I have OF 2.3 on Ubuntu 14.04. I use command of230 when I open a terminal and I can run cases from OF230.
|
|
October 19, 2018, 05:50 |
|
#80 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi,
this is normal, please check the changelogs. What happens is that there were too many tutorials for different OpenFOAM versions, so I moved the older ones to another repository and just kept the latest version in the main olaFlow repository. You can get them here: https://github.com/phicau/olaFlow_oldVersionTutorials and run them normally. Please, do also note that it is most often recommended to use recent OpenFOAM versions due to bug fixes. Bug fixes and new developments in olaFlow are back-compatible so far. Best, Pablo |
|
Tags |
olaflow, waves |
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 8, 2019 00:34 |
udf problem | jane | Fluent UDF and Scheme Programming | 37 | February 20, 2018 05:17 |
UDF velocity profile | willroca | Fluent UDF and Scheme Programming | 2 | January 10, 2016 04:13 |
Error messages | atg | enGrid | 7 | August 30, 2013 12:16 |
Phase locked average in run time | panara | OpenFOAM | 2 | February 20, 2008 15:37 |