CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

The IHFOAM Thread

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

Like Tree6Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   July 15, 2014, 08:37
Default The IHFOAM Thread
  #1
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Posts: 237
Rep Power: 7
Phicau is on a distinguished road
Dear colleagues,

Now that IHFOAM has been released I open this thread to gather questions, comments, bug reports and mainly anything you can think about regarding IHFOAM.

You can find a general wiki page, which will be growing day by day here:

http://openfoamwiki.net/index.php/Contrib/IHFOAM

The release thread can be found here:

IHFOAM Release

I look forward to having some feedback from you.

Best,

Pablo

Last edited by Phicau; July 16, 2014 at 02:04.
Phicau is offline   Reply With Quote

Old   July 23, 2014, 13:02
Default Compilation problem on OpenFOAM 2.2.x
  #2
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Hi Pablo,

This is really exciting. A new wave generation package for OpenFOAM. Thank you for your hard work and making the code open-source.
I have compiled IHFOAM for OpenFOAM 2.2.1 on my personal computer and it works without a problem (successfully ran the example provided).
However, I have problem compiling IHFOAM for OpenFOAM 2.2.x (i'm using this version on my university cluster). IHFOAM throw the following error.

Code:
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C
Making dependency list for source file IH_Waves_InletVelocity/IH_Waves_InletVelocityFvPatchVectorField.C
SOURCE=IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -DOFVERSION=22x -I/home/ehk112/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude -I./IH_Waves_InletVelocity/velProfiles -I../common -I../common/checks -I../common/calculateWaterLevel -IlnInclude -I. -I/home/ehk112/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/home/ehk112/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/IH_Waves_InletAlphaFvPatchScalarField.o
In file included from IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.H:277:0,
                 from IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C:47:
../common/memberFun.H:4:17: error: invalid suffix "x" on integer constant
../common/memberFun.H:15:17: error: invalid suffix "x" on integer constant
In file included from IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.H:277:0,
                 from IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C:47:
../common/memberFun.H: In member function ‘Foam::scalar Foam::IH_Waves_InletAlphaFvPatchScalarField::PI()’:
../common/memberFun.H:7:35: error: ‘mathematicalConstant’ has not been declared
IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C: In member function ‘virtual void Foam::IH_Waves_InletAlphaFvPatchScalarField::updateCoeffs()’:
IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C:316:12: warning: unused variable ‘auxiliarSolit’ [-Wunused-variable]
IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C:319:12: warning: unused variable ‘Csolitary’ [-Wunused-variable]
IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C:320:12: warning: unused variable ‘ts’ [-Wunused-variable]
IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C:321:12: warning: unused variable ‘Xa’ [-Wunused-variable]
IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C:361:18: warning: unused variable ‘g’ [-Wunused-variable]
In file included from IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.H:277:0,
                 from IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C:47:
../common/memberFun.H: In member function ‘Foam::scalar Foam::IH_Waves_InletAlphaFvPatchScalarField::PI()’:
../common/memberFun.H:10:9: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [Make/linux64GccDPOpt/IH_Waves_InletAlphaFvPatchScalarField.o] Error 1
\n\nWave generation boundary conditions compilation failed
Is there something that I did wrong?

Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   July 23, 2014, 15:32
Default
  #3
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Posts: 237
Rep Power: 7
Phicau is on a distinguished road
Hi katakgoreng,

thanks for your words.

I see the problem, DOFVERSION gets exported in the wrong way:

Code:
-DOFVERSION=22x
It is strange, as I have 2.1.x installed and DOFVERSION=21 for me. I don't know why 2.2.x behaves differently. I will try with 2.2.x tomorrow and report back.

Thanks for reporting this, I will update the allMake scripts soon to avoid problems (especially with 2.3.x).

In the mean time I suggest that you change these two lines:

Code:
ofversion=`echo $WM_PROJECT_VERSION | sed -e 's/\./\n/g' -e 's/-/\n/' | grep "[0-9]" | tr -d '\n'`
export OF_VERSION=$ofversion
for

Code:
export OF_VERSION=220
or just change the first line for:

Code:
ofversion=`echo $WM_PROJECT_VERSION | sed -e 's/\./\n/g' -e 's/-/\n/' | sed -e 's/x/9/g' | grep "[0-9]" | tr -d '\n'`
I guess that 2.2.2 solver should work in 2.2.x, but I cannot assure you that, as I have not tested any .x versions.

Best,

Pablo

EDIT:

I am not able to reproduce the error, in my installation of 2.2.x DOFVERSION=22, no x is found. However, I will push the change today

Last edited by Phicau; July 24, 2014 at 03:07. Reason: Minor correction
Phicau is offline   Reply With Quote

Old   July 25, 2014, 09:58
Default
  #4
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Hi Pablo,

I managed to compile the library after following your suggestion.
I applied the following in the allMake script.

Code:
ofversion=`echo $WM_PROJECT_VERSION | sed -e 's/\./\n/g' -e 's/-/\n/' | sed -e 's/x/9/g' | grep "[0-9]" | tr -d '\n'`
Many thanks.

Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   July 29, 2014, 11:31
Default baseWaveFlume error
  #5
New Member
 
Dmitrijs Gavrilovs-Stepanovs
Join Date: Jun 2014
Posts: 15
Rep Power: 3
Dmitrjs is on a distinguished road
Hi Pablo,
Thank you very much for a new toolbox for waves, it looks amazing.
I was just trying to check out a tutorial case named baseWaveFlume by running runCase, and it gave me the following error in the terminal:

Code:
 Running...
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  Uninterpreted: 
#3  Elliptic::ellipticIntegralsKE(double, double*, double*) at ??:?
#4  cnoidalFun::calculations(double, double, double, double*, double*) at ??:?
#5  Foam::IH_Waves_InletAlphaFvPatchScalarField::updateCoeffs() at ??:?
#6  Foam::fvPatchField<double>::evaluate(Foam::UPstream::commsTypes) at ??:?
#7  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() at ??:?
#8  
 at ??:?
#9  __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#10  
 at ??:?
./runCase: line 16: 10397 Floating point exception(core dumped) ihFoam > ihFoam.log
Simulation complete.
I do not have much experience with openFoam, so do not really understand this error.
I am also attaching log files:
BlockMesh: https://www.dropbox.com/s/onlb1p42tcda8gv/blockMesh.log
ihFoam: https://www.dropbox.com/s/ltpdgv7btjbsi0s/ihFoam.log
setFields: https://www.dropbox.com/s/5nbu2xzgy7v3zup/setFields.log

The openFoam version I am using is 2.1.1.

Thank you very much in advance,
Dmitrijs
Dmitrjs is offline   Reply With Quote

Old   July 29, 2014, 11:36
Default
  #6
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Posts: 237
Rep Power: 7
Phicau is on a distinguished road
Hi Dmitrjs,

apparently there is a floating point error when evaluating the elliptic integrals for the cnoidal wave theory. Can I see your IHwavesDict?

Best,

Pablo
Phicau is offline   Reply With Quote

Old   July 29, 2014, 12:21
Default
  #7
New Member
 
Dmitrijs Gavrilovs-Stepanovs
Join Date: Jun 2014
Posts: 15
Rep Power: 3
Dmitrjs is on a distinguished road
Hi Pablo,
Thank you for a super quick reply!
Here is the file:
https://www.dropbox.com/s/cfui3ucupz4ekeg/IHWavesDict

Regards,
Dmitrijs
Dmitrjs is offline   Reply With Quote

Old   July 29, 2014, 15:01
Default
  #8
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Posts: 237
Rep Power: 7
Phicau is on a distinguished road
Hi Dmitrijs,

I see, you are running the case with no modifications. Unfortunately I am not able to reproduce your error. From the logs I can confirm that we are using the same build (2.1.1-221db2718bbb) and the case runs flawlessly for me:

Code:
IH Wave Generation BC
Wave theory: cnoidal
H: 0.1
T: 3
h: 0.4
L: 3.73668
m parameter: 0.8011
Direction: 0º
Did you experience any problems when compiling the boundary conditions?

Which OS are you running? Version? 32 or 64 bits? Can run the case with other wave theories?

Best,

Pablo
Phicau is offline   Reply With Quote

Old   July 30, 2014, 06:50
Default Water depth
  #9
New Member
 
Dmitrijs Gavrilovs-Stepanovs
Join Date: Jun 2014
Posts: 15
Rep Power: 3
Dmitrjs is on a distinguished road
Hi Pablo,
Thank you for your suggestions, I tried other wave theories and everything else runs fine. It's OK because I do not need to use cnoidal wave theory in my research, so I can continue with other ones. Another question I want to ask is how do you specify the water depth, I looked in the user guide, but couldn't find it. Sorry about this noob question

Dmitrijs
Dmitrjs is offline   Reply With Quote

Old   July 30, 2014, 06:55
Default
  #10
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Posts: 237
Rep Power: 7
Phicau is on a distinguished road
Hi Dmitrjs,

no water depth needs to be specified, it is measured automatically by the BCs depending on the water (alpha1 field) that is set in setFieldsDict.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 1, 2014, 04:15
Default
  #11
New Member
 
Join Date: Aug 2014
Posts: 9
Rep Power: 3
surfer is on a distinguished road
Dear Pablo,

first of all I would like to thank you a lot for having released IHFoam; it seems extremely useful and powerful, since it allows to reduce the computational domain extension significantly handling appropriately the boundary conditions for both wave generation and absorption.

My main interest is focused on the evaluation of wave loads induced on semi and fully-submerged body. After having successfully installed IHFoam on OpenFOAM 2.2.2 version, I run the tutorial case "baseWaveFlume" and all seemed ok.

Afterwards, I created a new case. I took as reference a case described in a MSc thesis freely available at the following URL: http://publications.lib.chalmers.se/...ext/151295.pdf

The case is constituted by a 2D domain; there is an horizontal circular cylinder placed in the middle, whose axis is put exactly on the sea free surface at rest. At the inlet I generate a StokesV type wave. Since I would like to evaluate loads induced on the cylinder by the wave motion, I set in the controlDict file the forces function object structured as follows:

forces
{
type forces;
functionObjectLibs ("libforces.so");
log yes;
patches (cylinder);
pName p_rgh;
UName U;
rhoName rho;
rhoInf 1;
outputControl timeStep;
outputInterval 1;
}

Unfortunately I get results that are completely different from those shown in the thesis. My first question is: is it correct to integrate the p_rgh term on the cylinder surface? I looked at the source code, and it seems almost identical to that of the openfoam distribution except for the porosity treatment, so I thought that integrating the p_rgh term was correct; but looking at the results I am not so sure.

If you need more information before answering I can send you the case by email.

I thank you a lot for your attention and for your help.

Bye

surfer is offline   Reply With Quote

Old   August 1, 2014, 04:38
Default
  #12
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Posts: 237
Rep Power: 7
Phicau is on a distinguished road
Hi,

thanks for your feedback.

The ihFoam solver solves the same equations as interFoam when no porosity is present. You can check it by running the same case, first with ihFoam and then with interFoam (loading the BCs dyanmically), you will obtain the same results.

Regarding the force calculation, I would not integrate dynamic pressure (p_rgh) but total pressure (p).

You should also check out if libforces.so is suitable for a two-phase case, as I remember doing some modifications long time ago, but now I am not quite sure what they were about.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 1, 2014, 05:06
Default
  #13
New Member
 
Join Date: Aug 2014
Posts: 9
Rep Power: 3
surfer is on a distinguished road
Dear Pablo,

I thank you a lot for your quick answer.

Concerning the libforces library, I have already checked if it works appropriately: I have read in other threads about the problems concerning the use of it with interFoam, but I think that they are solved in the version 2.2.2 I am using: in particular I am referring to the density value that is taken into account.

The reason why I have integrated p_rgh and not p is that I would like to neglect the loads due to hydrostatic pressure and to consider only the dynamic ones; this because the work I took as reference explicitly tells that "...the initial force in still water are subtracted..." and I interpreted them as the hydrostatic forces.

Unfortunately at the present I have no more idea where the problem is.

I thank you a lot again for your help.

Bye

Gabriele
surfer is offline   Reply With Quote

Old   August 1, 2014, 08:21
Default
  #14
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Posts: 237
Rep Power: 7
Phicau is on a distinguished road
Hi Gabriele,

p_rgh is not generally the dynamic pressure, but a pseudo-dynamic pressure (p - rho g z). This is, the pseudo-dynamic pressure is dependent on the location of the fluid and its density.

It is easy to see that a case at rest should have dynamic pressure equals zero, but that is only the case if the free surface lies at Z = 0. Moreover, two bodies of water at rest with different free surface elevation have different pseudo-dynamic pressure values.

That is why I don't work with p_rgh, but with p, with which you can calculate the overpressure with respect to the initial state.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 1, 2014, 11:07
Default
  #15
New Member
 
Join Date: Aug 2014
Posts: 9
Rep Power: 3
surfer is on a distinguished road
Dear Paul,

yes, you are right!
My error was exactly what you said!

I erroneously thought that p_rgh was exactly the dynamic pressure and not a pseudo-dynamic pressure dependent on z since I put the origin of the coordinate system at z=0 and at the initial time p_rgh=0.

I thank you a lot for your useful help.

Bye

Gabriele
surfer is offline   Reply With Quote

Old   August 1, 2014, 12:48
Default tsmooth - arbitrary starting time
  #16
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Hi Pablo,

From IHFOAM manual, it stated that the tapering function, "tsmooth" varies linearly from t=0 to t=tsmooth.
Say I want to start my wave simulation at arbitrary time e.g t=-32s instead of t=0s, will the tapering function, "tsmooth" works in this case?

Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   August 2, 2014, 04:29
Default
  #17
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Posts: 237
Rep Power: 7
Phicau is on a distinguished road
Hi katakgoreng,

no, it will not work in that case. It won't be difficult for you to change the implementation and make it start at a given tStart.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 4, 2014, 08:53
Default Shifted water depth
  #18
New Member
 
Dmitrijs Gavrilovs-Stepanovs
Join Date: Jun 2014
Posts: 15
Rep Power: 3
Dmitrjs is on a distinguished road
Hi Pablo,
I modified the baseWaveFlume tutorial to simulate the following waves:
Type - Regular, Stokes 1
Period - 3.651s
Wave height - 0.033m
Wave Length - 10.862m
Frequency - 1.72 Hz

I also modified the tank:

Length (x) - 17.965m
Height (z) - 1.1
Width (y) - 0.1

In setFields directory I specified the water level to be 1m, however, by looking at the results it seems like the water level is shifted a bit. Below is the plot of the surface elevation against time at x=9.989m:

3.651_0.0128_0.006875.png

The cell size in x direction is 0.0128, in y it is 0.006875. The water level is shifted by 0.003125m. This happens at any x location along the wave tank. The analytical solution of Stokes 1st waves is also included for comparison.

I then refined the mesh to get the cell size of 0.00367 in y direction and got the following:

3.651_0.0128_0.00367.png

The water level is shifted upwards now by 0.001m.

My question is: would you say that this error is due to the mesh resolution or is there something I messed up in the set-up? Even if I force the solution to start at water depth of 1 (by adding/subtracting the differences), it is not quite stable compared to the analytical solution:

Test.png

I am also attaching my case: https://www.dropbox.com/s/ju3xfehxk4...eWaveFlume.zip

Thank you very much in advance!
Dmitrijs
Dmitrjs is offline   Reply With Quote

Old   August 4, 2014, 14:56
Default
  #19
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi katakgoreng,

no, it will not work in that case. It won't be difficult for you to change the implementation and make it start at a given tStart.

Best,

Pablo
Hi Pablo,

Thank you for your reply. I will implement the changes as needed.

Moving on to other problem. I managed to run IHFOAM for irregular waves (First Order) without any problem. However, when I turn the "secondOrder" switch as follows:

Code:
waveType        irregular;

genAbs          1;

absDir          0.0;

nPaddles        1;

secondOrder     1;

tSmooth         0;

waveHeights
151
(
   6.9996e-55
   1.5088e-44
   1.1786e-36
   1.5102e-30
   9.1404e-26
   5.5529e-22
   5.8462e-19
   1.5943e-16
   1.5204e-14
   6.3620e-13
   1.3881e-11
   1.8014e-10
   1.5382e-09
   9.3393e-09
   4.2838e-08
   1.5571e-07
   4.6602e-07
   1.1848e-06
   2.6248e-06
   5.1752e-06
   9.2422e-06
   1.5170e-05
   2.3170e-05
   3.3274e-05
   4.5330e-05
   5.9042e-05
   7.4054e-05
   9.0062e-05
   1.0697e-04
   1.2504e-04
   1.4505e-04
   1.6836e-04
   1.9685e-04
   2.3259e-04
   2.7701e-04
   3.2946e-04
   3.8535e-04
   4.3530e-04
   4.6719e-04
   4.7362e-04
   4.5762e-04
   4.2614e-04
   3.8523e-04
   3.4121e-04
   2.9907e-04
   2.6179e-04
   2.3055e-04
   2.0527e-04
   1.8521e-04
   1.6938e-04
   1.5682e-04
   1.4667e-04
   1.3823e-04
   1.3099e-04
   1.2457e-04
   1.1871e-04
   1.1325e-04
   1.0808e-04
   1.0316e-04
   9.8455e-05
   9.3941e-05
   8.9614e-05
   8.5468e-05
   8.1500e-05
   7.7706e-05
   7.4081e-05
   7.0623e-05
   6.7325e-05
   6.4182e-05
   6.1189e-05
   5.8340e-05
   5.5630e-05
   5.3052e-05
   5.0601e-05
   4.8271e-05
   4.6056e-05
   4.3951e-05
   4.1951e-05
   4.0051e-05
   3.8245e-05
   3.6529e-05
   3.4898e-05
   3.3349e-05
   3.1876e-05
   3.0476e-05
   2.9145e-05
   2.7880e-05
   2.6677e-05
   2.5532e-05
   2.4443e-05
   2.3407e-05
   2.2422e-05
   2.1483e-05
   2.0590e-05
   1.9739e-05
   1.8928e-05
   1.8156e-05
   1.7420e-05
   1.6718e-05
   1.6049e-05
   1.5411e-05
   1.4802e-05
   1.4222e-05
   1.3667e-05
   1.3138e-05
   1.2632e-05
   1.2150e-05
   1.1688e-05
   1.1247e-05
   1.0826e-05
   1.0423e-05
   1.0037e-05
   9.6681e-06
   9.3150e-06
   8.9770e-06
   8.6534e-06
   8.3435e-06
   8.0466e-06
   7.7620e-06
   7.4893e-06
   7.2278e-06
   6.9771e-06
   6.7366e-06
   6.5058e-06
   6.2843e-06
   6.0717e-06
   5.8676e-06
   5.6716e-06
   5.4832e-06
   5.3023e-06
   5.1284e-06
   4.9612e-06
   4.8004e-06
   4.6458e-06
   4.4971e-06
   4.3540e-06
   4.2163e-06
   4.0837e-06
   3.9561e-06
   3.8332e-06
   3.7148e-06
   3.6007e-06
   3.4907e-06
   3.3848e-06
   3.2826e-06
   3.1841e-06
   3.0891e-06
   2.9975e-06
   2.9090e-06
   2.8237e-06
   2.7414e-06
);
wavePeriods
151
(
     3.884249368809477e+00
     3.671732433514105e+00
     3.481263838023756e+00
     3.309592522968572e+00
     3.154046799746415e+00
     3.012465582580719e+00
     2.883057424737786e+00
     2.764301806471230e+00
     2.654942440847882e+00
     2.553913105660493e+00
     2.460284851780139e+00
     2.373278779565120e+00
     2.292221575306356e+00
     2.216513468644092e+00
     2.145646483285414e+00
     2.079174983366600e+00
     2.016694194542422e+00
     1.957859041980413e+00
     1.902363115462027e+00
     1.849923135693712e+00
     1.800296688894330e+00
     1.753266335182445e+00
     1.708627715650175e+00
     1.666205683094344e+00
     1.625841779581378e+00
     1.587384736025855e+00
     1.550704950470484e+00
     1.515684301148282e+00
     1.482208312520658e+00
     1.450179097118494e+00
     1.419506863315684e+00
     1.390103298576117e+00
     1.361893140416630e+00
     1.334806960217414e+00
     1.308775470406623e+00
     1.283739893757686e+00
     1.259645737232861e+00
     1.236437822632994e+00
     1.214071083861960e+00
     1.192497758104215e+00
     1.171677737068486e+00
     1.151573567701586e+00
     1.132146391056949e+00
     1.113363817234649e+00
     1.095195486918437e+00
     1.077609431237742e+00
     1.060579224737798e+00
     1.044080014115962e+00
     1.028085232378105e+00
     1.012573120436460e+00
     9.975261351847418e-01
     9.829169042049186e-01
     9.687294144999418e-01
     9.549365444666201e-01
     9.415397941794010e-01
     9.285137280754697e-01
     9.158431710153953e-01
     9.035137650322104e-01
     8.915119150567447e-01
     8.798247389120087e-01
     8.684400211899366e-01
     8.573461706633287e-01
     8.465321809208577e-01
     8.359875939441058e-01
     8.257024663732671e-01
     8.156673382327752e-01
     8.058732039100968e-01
     7.963114852005511e-01
     7.869678130164477e-01
     7.778469197261978e-01
     7.689350249903883e-01
     7.602250266078759e-01
     7.517101405697962e-01
     7.433838834374071e-01
     7.352400558782441e-01
     7.272727272727273e-01
     7.194762213108857e-01
     7.118451025056948e-01
     7.043741635556808e-01
     6.970584134950508e-01
     6.898930665746810e-01
     6.828735318219066e-01
     6.759954032312580e-01
     6.692499715568762e-01
     6.626422195863787e-01
     6.561636734667095e-01
     6.498105802158671e-01
     6.435793308062119e-01
     6.374664533278936e-01
     6.314686065382260e-01
     6.255825737718250e-01
     6.198052571881915e-01
     6.141336723351205e-01
     6.085649430078931e-01
     6.030962963856439e-01
     5.977250584276245e-01
     5.924486495133034e-01
     5.872645803113677e-01
     5.821670586591529e-01
     5.771606007087532e-01
     5.722395165720564e-01
     5.674016409255456e-01
     5.626448810568722e-01
     5.579672138465144e-01
     5.533666828987560e-01
     5.488413958134378e-01
     5.443895215904884e-01
     5.400092881597564e-01
     5.356989800291421e-01
     5.314569360444723e-01
     5.272815472549722e-01
     5.231712548785720e-01
     5.191245483616429e-01
     5.151373098499406e-01
     5.112134674075854e-01
     5.073489495340000e-01
     5.035424209312513e-01
     4.997925860767781e-01
     4.960981877533202e-01
     4.924580056435688e-01
     4.888708549862383e-01
     4.853355852904490e-01
     4.818510791054916e-01
     4.784162508432087e-01
     4.750300456503874e-01
     4.716914383287029e-01
     4.683994322998880e-01
     4.651530586139369e-01
     4.619492410173970e-01
     4.587913600411077e-01
     4.556763604217741e-01
     4.526033746107611e-01
     4.495715583049353e-01
     4.465800896732820e-01
     4.436281686141943e-01
     4.407150160420266e-01
     4.378398732015727e-01
     4.350020010092046e-01
     4.322006794194680e-01
     4.294352068159956e-01
     4.267048994256552e-01
     4.240090907549058e-01
     4.213471310473847e-01
     4.187166335182665e-01
     4.161205084992614e-01
     4.135563780732408e-01
     4.110236544113114e-01
     4.085217639969770e-01
     4.060501471931783e-01
     4.036082578249551e-01
     4.011955627770757e-01
);
wavePhases
151
{
0
};
waveDirs
151
{
0
};
I get the following error :

Code:
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

Reading g
Calculating field g.h

No finite volume options present

time step continuity errors : sum local = 0, global = 0, cumulative = 0
GAMG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
GAMG:  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

Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.00011999
Time = -31.9999

alpha1 BC on patch inlet
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  secondOrderFun::C(double, double, double, double) at ??:?
#4  secondOrderFun::etaSO(double, double, double, double, double, double, double, double, double, double, double, double, double, double) at ??:?
#5  Foam::IH_Waves_InletAlphaFvPatchScalarField::updateCoeffs() at ??:?
#6  Foam::fvPatchField<double>::evaluate(Foam::UPstream::commsTypes) at ??:?
#7  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() at ??:?
#8  
 at ??:?
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10  
 at ??:?
Is there something that I did wrong?
Really appreciate your help in this matter.

Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   August 5, 2014, 02:40
Default
  #20
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Posts: 237
Rep Power: 7
Phicau is on a distinguished road
Hi Dmitrijs, katakgoreng,

@Dmitrijs
I don't see anything wrong, setFields does not magically set water at your desired level, it just fills up full cells whose centre is inside the box you define. If the top of the filled cells is not exactly at 1 m, then you are definitely not obtaining that water level.

I would also not expect great results from your resolution, as the wave height is discretized by 2 cells only, which may not be enough.

@katakgoreng
I copied your IHWavesDict over to the default baseWaveFlume tutorial and it runs perfectly well for me:

Code:
Create time

Create mesh for time = -32


PIMPLE: Operating solver in PISO mode

Reading field porosityIndex

Porosity NOT activated

Reading field p_rgh

Reading field alpha1

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

Reading g
Calculating field g.h

time step continuity errors : sum local = 0, global = 0, cumulative = 0
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

Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.00119048
Time = -31.9988

alpha1 BC on patch inlet
MULES: Solving for alpha1
alpha1 BC on patch inlet
Phase-1 volume fraction = 0.571429  Phase-1 total volume = 0.08  Min(alpha1) = 0  Max(alpha1) = 1
alpha1 BC on patch inlet
MULES: Solving for alpha1
alpha1 BC on patch inlet
Phase-1 volume fraction = 0.571429  Phase-1 total volume = 0.08  Min(alpha1) = 0  Max(alpha1) = 1
Velocity BC on patch inlet
3D_2D Absorption BC on patch outlet
"Initial water depths for absorption" 1( 0.4 )

"Correction Levels" 1( 0 )

DICPCG:  Solving for p_rgh, Initial residual = 1, Final residual = 0.00153011, No Iterations 1
time step continuity errors : sum local = 0.00120801, global = -9.77904e-10, cumulative = -9.77904e-10
DICPCG:  Solving for p_rgh, Initial residual = 0.000715141, Final residual = 2.98766e-05, No Iterations 16
Velocity BC on patch inlet
3D_2D Absorption BC on patch outlet
"Correction Levels" 1( 0 )

time step continuity errors : sum local = 5.04735e-05, global = -3.37527e-05, cumulative = -3.37537e-05
DICPCG:  Solving for p_rgh, Initial residual = 1.47718e-05, Final residual = 9.43515e-08, No Iterations 32
Velocity BC on patch inlet
3D_2D Absorption BC on patch outlet
"Correction Levels" 1( 0 )

time step continuity errors : sum local = 3.19798e-07, global = -7.17437e-09, cumulative = -3.37609e-05
ExecutionTime = 2.74 s  ClockTime = 3 s

Courant Number mean: 1.09895e-06 max: 8.59363e-06
Interface Courant Number mean: 0 max: 0
deltaT = 0.00139456
Time = -31.9974
It seems that you are facing problems with your C++ compilation. I programmed the wave generation functions to be independent (written in regular C++ and the library loads <math.h>).

The problem seem the same you were facing with the cnoidal function. Which OS and version are you using? 32/64 bits?

Best,

Pablo
Phicau is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide: Getting Started with the CFD Online Discussion Forums pete Site Help, Feedback & Discussions 6 July 20, 2015 07:20
Error messages atg enGrid 7 August 30, 2013 11:16
udf problem jane Fluent UDF and Scheme Programming 11 December 4, 2012 04:09
Please check out my parallelized udf code aleisia Fluent UDF and Scheme Programming 0 June 10, 2011 16:16
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 15:37


All times are GMT -4. The time now is 17:45.