CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[OLAFLOW] The OLAFOAM Thread

Register Blogs Community New Posts Updated Threads Search

Like Tree16Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2016, 08:51
Default The OLAFOAM Thread
  #1
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Dear colleagues,

Now that I have released OLAFOAM (https://sites.google.com/site/olafoamcfd/) I open this thread to inform about code changes, gather questions, comments, bug reports and mainly anything you can think about.

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

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

I look forward to having some feedback from you.

Best,

Pablo


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As a first major commit, I have added support for compilation in OpenFOAM v3.0+ (I just learned that such a thing existed yesterday..) and most important, modified the moving boundary condition to be compiled and used with Foam-Extend.

Last edited by Phicau; March 27, 2016 at 22:25. Reason: Add info
Phicau is offline   Reply With Quote

Old   April 2, 2016, 23:38
Default
  #2
New Member
 
Steven
Join Date: Apr 2016
Posts: 3
Rep Power: 10
C4l4M1TY is on a distinguished road
Clean build of OpenFOAM-3.0.1 from source on Fedora 23 Workstation (x86_64).

After a successful build both the OlaFOAM boundary conditions and solvers (using olaFoamOF300) compiled with no issues. Thanks Pablo!

Steven
C4l4M1TY is offline   Reply With Quote

Old   April 25, 2016, 12:11
Default OlaFoam wave generation on a dike
  #3
New Member
 
Martin Silkens
Join Date: Apr 2016
Posts: 10
Rep Power: 10
ms411 is on a distinguished road
Hello everybody,

I am new here and I need help. I want to simulate waves on a dike in 2D and in 3D. I took for the 2D simulation the baseWaveFlume Tutorial and for the 3D simulation the irreg45degTank. In both tutorials I created an oblique wall at the "Outlet" (now it is defined as a wall) so that the waves can be reflected or run up the dike. When I now simulate this case in my opinion, the wave should come from the left side (Inlet-wave generation) and it runs up the dike at the right side. But if I view the case in paraview from the first time step on the right side at the "Outlet" (defined as a wall) there develop velocities in different directions, although the wave is neither generated nor it reaches the dike yet.

In the initial conditions I simulated two different cases for pressure. One time I set the pressure conditions to "zeroGradient" and another time I set it to "fixedfluxpressure".

Below I attach you the pictures from start of the case to a few time steps later. After it I copied my data from the initial conditions and important .dicts of my constant folder.

Do you have a solution ? I hope so, thank you very, very much for an answer!

Best regards

ms411
t0.png

t1.png

t2.png

t3.png

t4.png
alpha.water.org :

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type waveAlpha;
waveDictName waveDict;
value uniform 0;
}
frontAndBack
{
type empty;
}
outlet
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
}


p_rgh:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
frontAndBack
{
type empty;
}
outlet
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
atmosphere
{
type totalPressure;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
p0 uniform 0;
value uniform 0;
}
}


U:

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type waveVelocity;
waveDictName waveDict;
value uniform (0 0 0);
}
outlet
{
type fixedValue;
value uniform (0 0 0);
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}


BlockMeshDict:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(0.0 -0.02 0.0)
(10.0 -0.02 0.0)
(14.0 -0.02 0.7)
(0.0 -0.02 0.7)
(0.0 0.0 0.0)
(10.0 0.0 0.0)
(14.0 0.0 0.7)
(0.0 0.0 0.7)
);

blocks
(
hex (0 1 5 4 3 2 6 7) (500 1 70) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch inlet
(
(0 4 7 3)
)
wall outlet
(
(1 5 6 2)
)
wall bottom
(
(0 1 5 4)
)
patch atmosphere
(
(3 2 6 7)
)
empty frontAndBack
(
(0 1 2 3)
(4 5 6 7)
)
);

mergePatchPairs
(
);


boundary:

FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

5
(
inlet
{
type patch;
nFaces 70;
startFace 69430;
}
outlet
{
type wall;
inGroups 1(wall);
nFaces 70;
startFace 69500;
}
bottom
{
type wall;
inGroups 1(wall);
nFaces 500;
startFace 69570;
}
atmosphere
{
type patch;
nFaces 500;
startFace 70070;
}
frontAndBack
{
type empty;
inGroups 1(empty);
nFaces 70000;
startFace 70570;
}
)
ms411 is offline   Reply With Quote

Old   April 25, 2016, 22:46
Default
  #4
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Martin,

these results really look nonphysical. First, you should definitely use fixedFluxPressure as p_rgh BC. Second, based on the limited information I can only guess that you have a huge non-orthogonality error due to your approach to create the mesh. You can try either creating a second block with a slope attached to the first one, or a longer one and use snappy to carve the slope.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   May 1, 2016, 10:41
Default
  #5
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Dear all,

I have included support to generate and absorb waves and currents simultaneously in olaFoam.

For further details: https://sites.google.com/site/olafoa...urrentsarehere

Best,

Pablo
Phicau is offline   Reply With Quote

Old   May 2, 2016, 09:11
Default
  #6
New Member
 
Martin Silkens
Join Date: Apr 2016
Posts: 10
Rep Power: 10
ms411 is on a distinguished road
Hello Pablo,

thank you for you very, very quick answer. I didn't answer so quick, because I tried to solve the problem. In fact you are right that my results look very non-physical because of the mesh. In the cfd-forum I found a post, where is the same problem discussed, but this guy was simulating with waves2foam.
Nevertheless, I think it makes no difference if I will simulate with OlaFoam or Waves2Foam, because both tools are based on interfoam/MULES.

My plan was now to divide my mesh. For the rectangular I will mesh rectangulars and for the triangle with triangles mesh. For this I used gmsh and I created my mesh in a *.msh file.

Now I have new Problems.

1. Gmsh doesn't create walls, it only patches.
2. I can't setFields because there are no coordinates written in the mesh.
3. Does the wave.dict know that waves should be produced at the inlet?

Thanks for an answer!!

I really want to find out, if the model is physical with this Mesh.

So please, Pablo or anyone else, help me!!

Thank you very, very much in advance!!

Best regards

Martin

Last edited by ms411; May 2, 2016 at 10:55.
ms411 is offline   Reply With Quote

Old   May 2, 2016, 23:22
Default
  #7
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Martin,

you can use only rectangles, only triangles or a mix of both to generate this simple mesh. There are lots of options.

And remember that google is your friend:

https://openfoamwiki.net/index.php/2...ial_using_GMSH

Best,

Pablo
Phicau is offline   Reply With Quote

Old   May 9, 2016, 17:55
Default Installation OLAFOAM
  #8
New Member
 
Ilmas Bayati
Join Date: May 2016
Posts: 1
Rep Power: 0
ingbay86 is on a distinguished road
Hi All,
i have just installed successfully the OpenFoam version OpenFOAM-v3.0+ and tried to install OLAFOAM but i got the following error:
olaFoam.C:80:28: fatal error: fvIOoptionList.H: File o directory non esistente
compilation terminated.
Is it a matter of OF compatibility? could you give me a help?
Thanks
Ing.
ingbay86 is offline   Reply With Quote

Old   May 10, 2016, 00:39
Default
  #9
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi ingbay86,

I have just pushed a new commit, adding the solver for OpenFOAM v3.0+. Please update the code and try to recompile:

git checkout
git pull

Best,

Pablo
Phicau is offline   Reply With Quote

Old   May 15, 2016, 12:56
Default Wave run up on a dike
  #10
New Member
 
Martin Silkens
Join Date: Apr 2016
Posts: 10
Rep Power: 10
ms411 is on a distinguished road
Dear Pablo,
since a few weeks I am trying to simulate waves on a dike. I need your help. I read a lot of papers for similar cases. I think the boundary conditions are right and the mesh is the problem. I read in the cfd forum, that other people had the same problem, due to the orthogonality of the mesh. This was my first mesh with the following results: Picture 01 02
So I tried to create it with snappyHexMesh.There seems to be a problem with the inlet at first time step. So do you know where my fault could be? Picture 03 04

Do I have to change something in the fvschemes or in the fvsolution? I load the case in a dropbox. Would you be so nice and have a look on it, I really don't know what to do.
https://www.dropbox.com/s/68apuhz3yq..._case.zip?dl=0

Thank you very, very much and best regards.

Martin
Attached Images
File Type: png 01.PNG (9.3 KB, 137 views)
File Type: png 02.PNG (1.4 KB, 110 views)
File Type: png 05.PNG (1.3 KB, 100 views)
File Type: png 0304.png (15.8 KB, 113 views)
File Type: png 06.png (90.0 KB, 79 views)
ms411 is offline   Reply With Quote

Old   May 16, 2016, 06:27
Default
  #11
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Martin,

to work with olaFoam, gravity needs to act in the negative Z direction.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   May 20, 2016, 00:40
Default
  #12
Member
 
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 11
ce73stargazer is on a distinguished road
Hi there

I experience an error saying

Reading g
Reading field porosityIndex

Floating point exception (core dumped)


when i trying to start the case, then the process terminated, anyone have any idea of why?

Thanks in advance
ce73stargazer is offline   Reply With Quote

Old   May 20, 2016, 02:04
Default
  #13
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Zhifang,

with that amount of information I can only tell you that you are dividing by 0 somewhere.

http://www.cfd-online.com/Forums/ope...-get-help.html

Best,

Pablo
Phicau is offline   Reply With Quote

Old   May 22, 2016, 20:17
Default
  #14
Member
 
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 11
ce73stargazer is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Zhifang,

with that amount of information I can only tell you that you are dividing by 0 somewhere.

http://www.cfd-online.com/Forums/ope...-get-help.html

Best,

Pablo
Hi Pablo

Thanks for the reply and the link, thats really handy for checking
ce73stargazer is offline   Reply With Quote

Old   May 24, 2016, 01:03
Default About multiPistonMovement
  #15
Member
 
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 11
ce73stargazer is on a distinguished road
Hi there

I recently came across a question when i am using multiPistonMovement. After i finished doing all the preparation, blockMesh, setField etc and try to run the case it shows
Quote:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.4.0-f0842aea0e77
Exec : olaDyMFoam
Date : May 24 2016
Time : 13:49:05
Host : "ubuntu14.04"
PID : 14994
Case : /home/zhifang/OpenFoamTests/OLAFOAM_Test/B203
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: displacementLaplacian
Selecting motion diffusion: inverseDistance

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

DICPCG: Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Reading/calculating face velocity Uf

Courant Number mean: 0 max: 0

Starting time loop

Reading surface description:
topFreeSurface

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

PIMPLE: iteration 1
Point displacement BC on patch inlet
Initial water depth Paddle_inlet = 0.24

--> FOAM FATAL IO ERROR:
wrong token type - expected Scalar, found on line 13327 the punctuation token ')'

file: /home/zhifang/OpenFoamTests/OLAFOAM_Test/B203/constant/multiPistonMovementDict.timeSeries at line 13327.

From function operator>>(Istream&, Scalar&)
in file lnInclude/Scalar.C at line 93.
I really dont understand why, the multiPistonMovementDict file looks perfectly fine to me. Any suggestions?

Last edited by ce73stargazer; May 25, 2016 at 20:26.
ce73stargazer is offline   Reply With Quote

Old   May 31, 2016, 12:09
Default Run-up height calibration
  #16
New Member
 
Martin Silkens
Join Date: Apr 2016
Posts: 10
Rep Power: 10
ms411 is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Martin,

to work with olaFoam, gravity needs to act in the negative Z direction.

Best,

Pablo
Dear Pablo,

thank you for your support! It seems that there are waves running up on the dike. I have now another question, but I am not sure, if it is the right thread here. Now I want to calibrate the runup height on the dike by changing the roughness of the ground and of the dike surface. I postprocess with Paraview. Is there a possibility, how I can find out, how high my waves run up on the dike? Or can I act on the assumption, that OlaFoam simulates the right wave runup heights due to a realistic szenario?

Thank you again for your support!

Best regards

Martin
ms411 is offline   Reply With Quote

Old   June 1, 2016, 05:10
Default
  #17
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi,

Zhifang, your dictionary file is not right. OpenFOAM looks for a scalar value and finds the end of the file. Check the number of elements on your time series.

Martin, CFD always need validation, you can never assume that the model performs well unless you prove so. There are a number of ways to obtain runup, I suggest that you take a look at the sampling utility in OpenFOAM.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 1, 2016, 20:05
Default
  #18
Member
 
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 11
ce73stargazer is on a distinguished road
Hi Pablo

Thanks for the reply. I am pretty sure the time series have the same elements as the piston movements, thats why I am confused.

The attachment is the zip file of the multiPistonMovementDic, would u mind having a look at it?

Cheers
Zhifang
Attached Files
File Type: zip multiPistonMovementDict.zip (48.6 KB, 19 views)
ce73stargazer is offline   Reply With Quote

Old   June 1, 2016, 23:03
Default
  #19
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Zhifang, your dictionary is not good at all and it is very easy to tell. You say that your time series has 13928 elements, yet your series starts at line 31 and ends at line 13328. Do the math.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 2, 2016, 02:24
Default
  #20
New Member
 
chunping ren
Join Date: May 2016
Posts: 8
Rep Power: 10
handsomedog is on a distinguished road
Hi, Pablo. I think the Olafoam can be used to simulate the longshore currents whatever in practical field and laboratory. But I did not find any publications or reports about this in recent days. Could you give me some suggestions how to use the Olafoam to calculate the 2D or 3D longshore currents ?
Best regards
Chunping
handsomedog is offline   Reply With Quote

Reply

Tags
generation, ihfoam, olafoam, waves


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


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


All times are GMT -4. The time now is 14:54.