|
[Sponsors] |
September 3, 2019, 06:04 |
wave field initialisation
|
#141 |
Member
Paul Palladium
Join Date: Jan 2016
Posts: 94
Rep Power: 10 |
Dear Pablo Higuera,
First of all I would like to thank you for your OpenFOAM package and to have release it to the community. If I am correct olaFlow is not provided with a pre-processor utility for wave field initialisation. Do you plane to add it ? (it's available with waves2foam and with standard wave libraries of OpenFOAM.org version) This is very useful to deal with seakeeping analysis for example. Thanks in advance, Paul |
|
September 5, 2019, 03:25 |
|
#142 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Paul,
thanks. Right now the pre-processor utility for wave field initialization setOla is not included in the github release, but it will in the future. Drop me an email ( https://olaflow.github.io/contact/ ) if you want to have access to it. Best, Pablo |
|
September 14, 2019, 14:31 |
How to create my own wave profile
|
#143 |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Dear Pablo
as you mentioned in OlaFlow documents, there are different types of initial waves such as stokes I, stokes II, etc. How can I create my own wave profiles? to be more clear, suppose that my interesting profile is : v_x=f'(z) * exp(i*k*x-i*w*t) v_y=0 v_z=-i*k*f(z)*exp(i*k*x-i*w*t) where f(z) is an arbitrary function that can be defined in "wavedict", k is the wavenumber and w is the wave angular frequency. and How can I study the wave damping (it does not matter which profile is used) and dispersion w.r.t distance and w.r.t time thank you in advance. |
|
September 16, 2019, 21:25 |
|
#144 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Arash,
adding a new wave profile is not difficult, you need to look for every place where 'stokesI' appears in the code and add a new if/else in the structure. Adding your own function in the program is straightforward, however, including an arbitrary function that needs to be read from waveDict is not so. You may find swak4foam more suitable for your purpose. Best, Pablo |
|
October 15, 2019, 19:14 |
water wave problem
|
#145 |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Dear Pablo
Enclosed I try to simulate simple water waves. I set nu=0 which means it is an inviscid flow and bottom boundary as noSlip which means u=0. however, there is 3 problem 1) there is a small wave at the beginning of the simulation and then there are big ones. what is this? and why does it happen? 2) the wave is damped? why? we expect that a cosine wave travels through the box 3) I think the no-slip boundary condition at the bottom is not applied! why? How can I apply this condition? 4) Some means to specify (and use) initial conditions for a Navier-Stokes solver. These initial conditions include u(x,y,z), v(x,y,z), w(x,y,z), eta(x,y) (and perhaps p(x,y,z)) given on the grid. I believe that exactly such initial conditions are provided by e.g. the Stokes I. generator (in the inviscid case) if applied to a single time step. It is a question, however, how these initial conditions should be handled and passed to a solver? Thank you in advance |
|
October 20, 2019, 08:29 |
Tsunami wave using irregular wavedict on breakwater tutorial
|
#146 |
New Member
Saffa
Join Date: Apr 2017
Posts: 4
Rep Power: 9 |
Hi Dr Higuera,
I am trying to run the breakwater tutorial with a tsunami. I used irregular wavedict to put in my tsunami profile like so: Code:
waveType irregular; genAbs 1; absDir 0.0; nPaddles 1; secondOrder 1; // 0/1, true/false, on/off waveHeights 93( 0.00312 0.00168 0.00336 0.0192 0.03336 0.05064 0.08064 0.1392 0.18696 0.23064 0.25128 0.27672 0.27696 0.26136 0.2316 0.1884 0.15048 0.11808 0.07896 0.0372 0.00264 0.04272 0.07584 0.13656 0.19608 0.24072 0.2868 0.31776 0.36912 0.33336 0.29184 0.258 0.22176 0.18576 0.15648 0.12576 0.08208 0.06096 0.03384 0.01296 0.02832 0.0396 0.05136 0.04632 0.01944 0.00144 0.02904 0.0468 0.0576 0.07224 0.10272 0.126 0.14568 0.16056 0.15408 0.14376 0.12888 0.14232 0.1524 0.1164 0.078 0.0492 0.01296 0.01032 0.04872 0.09744 0.07992 0.05208 0.03072 0.00504 0.05856 0.15384 0.19752 0.25296 0.29928 0.32928 0.3756 0.42096 0.3804 0.31536 0.25296 0.21984 0.18288 0.13944 0.1116 0.06024 0.01776 0.01296 0.0444 0.06624 0.09648 0.1104 0.11832 ); wavePeriods 93( 47.6000 29.3000 44.1000 69.1000 58.8000 63.0000 58.8000 57.9000 36.3000 28.5000 55.3000 60.5000 44.9000 38.0000 25.1000 7.7000 22.5000 33.7000 18.1000 19.0000 23.4000 11.2000 21.6000 21.6000 24.2000 16.4000 31.1000 28.5000 48.4000 28.5000 32.0000 22.5000 30.2000 5.2000 38.0000 19.9000 19.8000 37.2000 25.9000 25.9000 21.6000 45.0000 33.7000 32.8000 36.3000 31.9000 38.1000 37.1000 31.1000 26.8000 30.2000 32.0000 25.9000 41.5000 27.6000 15.6000 25.9000 12.1000 42.4000 25.0000 22.5000 13.8000 42.3000 31.1000 28.5000 39.8000 38.9000 43.2000 32.8000 31.1000 31.1000 39.8000 31.9000 32.0000 27.6000 17.3000 12.1000 45.8000 34.6000 15.5000 54.5000 29.3000 20.8000 45.8000 20.7000 24.2000 23.3000 39.8000 43.2000 25.9000 44.9000 30.2000 30.2000 ); wavePhases 93( 6.031 0.448 4.733 4.063 3.981 1.722 5.597 5.440 6.123 5.029 1.612 0.478 3.856 3.846 3.726 3.559 4.287 4.558 0.713 1.751 1.739 0.578 0.632 0.420 4.547 1.600 0.838 0.225 5.969 1.028 2.670 3.168 0.889 0.889 1.015 0.892 0.019 0.103 0.471 5.316 0.669 1.317 1.831 5.503 3.030 0.963 3.674 3.422 6.053 4.098 3.665 4.696 5.042 0.198 2.192 0.733 0.450 5.616 0.709 3.558 6.164 5.356 5.443 4.793 6.229 4.799 5.176 4.276 6.136 1.861 1.834 2.879 5.352 6.242 5.113 0.233 4.639 0.084 4.782 0.977 4.386 5.598 0.968 1.448 5.431 3.779 1.650 3.107 0.991 3.069 4.046 1.852 5.574 ); waveDirs 93{ 0 }; 1. While the solver runs, I can't see any waves generated in Paraview, . Im expecting this surface elevation; Mercator Time Series pic.PNG 2. The probing python codes does not work. What should I provide in order for you to see the problems better? |
|
October 21, 2019, 12:43 |
Wave models in OF and olaFlow
|
#147 |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Dear Pablo
there is a wave folder in the tutorial directory in OpenFoam. there, one can define different wave models. these models are the same as olaFlow. What are the differences between wave models in OF and olaFlow? what are the important or significant features in olaFlow? |
|
October 24, 2019, 01:30 |
|
#148 | ||
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Quote:
Hi Arash, 1) You are starting your case with wave phase 0, which corresponds to a crest, and have no smoothing time, so there is a jump. You want to avoid that. Either add a tSmooth that will ramp up the free surface elevation differences or use the phase provided by default (pi/2) or (3pi/2). 2) The first waves in a regular train always decay. This is normal, as they spend some of their energy in getting the orbital motions started. 3) It is set correctly, so most likely it is working correctly (99.9% chance) or it is a bug in OpenFOAM (0.01% chance). What makes you think that it is working as it should? Remember that the noSlip condition is enforced at the wall, so the first cell will still have a nonzero velocity. Moreover, you might not have enough resolution for the boundary layer to be distinguished. 4) I don't get your question. I am not sure if this is what you ask, but I have developed a utility to set waves as an initial condition in the same way as setFields works. It is called setOla and will be released soon. Quote:
I also invite you to take a look at this: https://olaflow.github.io/numerical-...al-references/ I am sure you will be able to take your own conclusions. Best, Pablo |
|||
October 24, 2019, 01:33 |
|
#149 | |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Quote:
you can start by sending your case, or a minimal working example (e.g., if the case bathymetry is complex, a simple wave flume with the relevant dimensions will do) so that I can take a look and providing the version of OpenFOAM that you are using. Best, Pablo |
||
October 25, 2019, 12:24 |
Tsunami wave using irregular wavedict on breakwater tutorial
|
#150 | |
New Member
Saffa
Join Date: Apr 2017
Posts: 4
Rep Power: 9 |
Quote:
For your reference; breakwater.zip (i removed polymesh folder to make the size smaller to attach here. its the default polymesh folder) Rgds |
||
October 28, 2019, 02:41 |
|
#151 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Saffa,
the water depth in this case is unsuitable for the wave conditions that you provided, nevertheless I ran it for 0.3 seconds and can already see a wave propagating (touching the top boundary...). You should consider 2 things, disconnect 2nd order wave generation for a faster performance, and considering wavemaker - tueta type of generation (see the manual). Regarding the sampling, in the new version of OpenFOAM, some names have changed. When you run the sampling command it warns you: Code:
Unknown sample set type midPointAndFace The sample set type midPointAndFace has been renamed lineCellFace Replace "type midPointAndFace;" with "type lineCellFace;" You should pay attention to the errors and explanations that OpenFOAM provide. They are most often very helpful. Best, Pablo |
|
October 29, 2019, 11:02 |
|
#152 | |
New Member
Saffa
Join Date: Apr 2017
Posts: 4
Rep Power: 9 |
Quote:
|
||
October 31, 2019, 20:58 |
wave propagation
|
#153 |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Dear Pablo
enclosed, I upload a wave propagation case. During this simulation, something strange happened!!! I can not understand what happened here and what is set wrong! I believe that this behavior is not physically. Could you please help me with this case |
|
October 31, 2019, 23:36 |
|
#154 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Arash,
you should always give enough information: How to give enough info to get help Your mesh is not good, the aspect ratio of your cells is too large. Try with 1V:2H. Probably having such fluid properties with very large surface tension and inviscid air don't help either in this case. Best, Pablo |
|
November 1, 2019, 00:26 |
description
|
#155 | |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Quote:
first of all, please accept my apologies for the inconvenience. In fact, I tried to apply the stokes I model to a thin layer of Glycerin. the smallest depth, the most interesting. So, I inserted glycerin properties in "transportProperties". I also tried to make a fine resolution in the surface. To do this, the height of the box is divided into three parts so that the middle one contains fine mesh size. after running it, there is something strange for me. 1) there some distortion in generated waves. 2) after a few seconds, I see an odd behavior like reflection!!! I don't know how to describe this behavior to be more clear. I expect to see a sin/cos wave with damping. thanks for your attention |
||
November 4, 2019, 02:19 |
ola-compilation
|
#156 |
Member
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 7 |
hello, Phicau,
first thx a lot for your olaflow and sharing your olaflow. a small issue: in Ubuntu (OFv1906 installed), "offlinewise" I compiled "olaFlow-master.zip" and ran an example-case with full success in same manner, I compiled "olaFlow_supplementary-master.zip": in the last of 3 available "allMake"s in it, came a msg.: sth like '.....enter the isoAdvector path ...' so i want to ask, how shall I deal with it? did I do sth wrong? thank you in advance |
|
November 6, 2019, 10:34 |
complex number
|
#157 |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Dear publo
as you told me, to add the new namespace I made a copy of StokesI in waveFun.C and made necessary changes in other files. In new namespace, I want to use complex numbers and operations on them. to do this I did #include "complex.H" namespace myname { Foam::complex Q(a,b) Foam::complex s=sinh(Q)*Q Foam::complex m=Q*Q return s } then I tried to compile the code by using ./allMake. there are errors during the compile process. does OpenFOAM or olaFlow support complex numbers and functions such as sinh(), cosh() and exp()? if yes, then how? Last edited by arashghgood; November 6, 2019 at 18:31. |
|
November 15, 2019, 19:54 |
failed to use run time functionObjects
|
#158 |
New Member
M.W.G.
Join Date: Sep 2018
Posts: 7
Rep Power: 8 |
Hi Pablo,
I am getting errors whenever I use functionObjects in my controlDict. For example, if the lines from 61 to 124, in the attached controlDict, are not commented out I get the following error from the decomposePar: Code:
--> FOAM FATAL IO ERROR: keyword origin is undefined in dictionary "/home/student.uni.edu.eg/mwg/Desktop/testCaseOfPostProcessingForPablo/0/U.boundaryField.inlet" file: /home/student.uni.edu.eg/mwg/Desktop/testCaseOfPostProcessingForPablo/0/U.boundaryField.inlet from line 26 to line 28. From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const in file db/dictionary/dictionary.C at line 566. FOAM exiting Code:
Create time Create mesh for time = 0 Selecting dynamicFvMesh staticFvMesh PIMPLE: No convergence criteria found PIMPLE: Operating solver in PISO mode Reading field porosityIndex Porosity NOT activated Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Selecting laminar stress model Stokes Reading g Reading hRef Calculating field g.h No MRF models present DICPCG: Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 0, global = 0, cumulative = 0 Courant Number mean: 0 max: 0 Starting time loop Reading surface description: topFreeSurface -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 0 in communicator MPI COMMUNICATOR 3 SPLIT FROM 0 with errorcode 1. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. -------------------------------------------------------------------------- I have tried that of two versions of OpenFOAM (5 and 6). Looking forward to hearing from you. MWG Last edited by M.W.G.; November 15, 2019 at 20:02. Reason: errors |
|
November 18, 2019, 03:54 |
three-dimensional wave-breakwater errors
|
#159 |
New Member
Lin Cui
Join Date: Oct 2017
Posts: 6
Rep Power: 9 |
Dear Pablo,
Recently, I am simulating a three-dimensional case with breakwaters using olaFlow, the wave condition is: cnoidal wave, wave period=6s, wave height=2m, water depth=4m. The case works fine with no problem. However, when I just change the wave height to 1m (did not change anything else), the case will stop after outputting several time steps. and the error shows as: Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib64/libc.so.6" #3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:? #4 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #5 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? #6 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:? #7 ? at ??:? #8 __libc_start_main in "/lib64/libc.so.6" #9 ? at ??:? /var/spool/PBS/mom_priv/jobs/5393390.pbsserver.SC: line 33: 89449 Floating point exception(core dumped) olaFlow > olaFlow2.log Do you have any idea what might cause this error? what else information should I provide to better describe the problem? Thank you very much in advance! Best regards, Lin |
|
November 18, 2019, 18:24 |
read transport properties in Stokes namespace
|
#160 |
Member
Arash
Join Date: Aug 2018
Posts: 31
Rep Power: 8 |
Dear Pablo
How can I read constant/transportproperties values such as viscosity nu and use it in namespace StokesI in waveFun.C Thanks for attention. |
|
Tags |
olaflow, waves |
|
|
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 |