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   September 19, 2017, 09:57
Default about the active wave absorption at the inlet when using the OLAfoam?
  #161
New Member
 
Maoyanjun
Join Date: Jan 2016
Posts: 20
Rep Power: 10
Maoyanjun is on a distinguished road
hi, foamers:
I am using the WaveMaker piston type boundary in the OLAFoam to generate waves in the NWT, and I found the active absorption in the outlet is not very stable to absorb the wave.have you met this problem? and I also have a question about the wave absorption at the inlet. I got the surface elevation in time history.is it sufficient to absorb the secondary reflection? I have no idea about it. because the wave height is larger than what I set H 0.2. is it normal?
Attached Images
File Type: jpg QQ--20170916105146.jpg (67.4 KB, 101 views)
Maoyanjun is offline   Reply With Quote

Old   September 19, 2017, 10:31
Default
  #162
Member
 
Join Date: Apr 2015
Posts: 42
Rep Power: 11
HosseinB is on a distinguished road
Pablo can correct me, but I think shallow water waves are absorbed better than other waves. Irregular waves reflected more than shallow water regular waves in two studies that I recently conducted.

Cheers,
Hossein
HosseinB is offline   Reply With Quote

Old   September 19, 2017, 20:54
Default
  #163
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Maoyanjun,

it is difficult to know what is going on without the complete wave conditions (H,T,h) and a proper incident-reflected analysis. However, I suspect that, as Hossein points out, your waves are not in shallow water conditions. Active wave absorption was designed for shallow water conditions, and the performance diminishes for intermediate or deep water waves.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   September 20, 2017, 00:24
Default
  #164
Member
 
tobiasS's Avatar
 
Hussam
Join Date: Aug 2017
Location: Germany
Posts: 32
Rep Power: 8
tobiasS is on a distinguished road
Sent from my GT-N7100 using CFD Online Forum mobile app
tobiasS is offline   Reply With Quote

Old   September 25, 2017, 11:51
Default Structured vs unstructured mesh
  #165
New Member
 
James Bridgwater Court
Join Date: Jan 2016
Posts: 14
Rep Power: 10
jbcourt is on a distinguished road
Hi Pablo,
Thank you for providing and maintaining such a useful wave toolbox as olaFoam. Earlier on in this thread, you advised against an unstructured, tetrahedral mesh:

Quote:
Originally Posted by Phicau View Post
I think you might be experiencing that because of a pressure instability, please check whether you obtain abnormal pressures/velocities at that location.

I notice that you mesh is made from triangular prisms, and that the smearing of the VOF function is very significant (probably this is the root of the problem, as VOF should be as sharp as possible). From my practical knowledge, I will advice you against using triangles in the mesh to avoid such problems. Try with a structured mesh.
Are the wave generation/absorption boundary conditions in olaFoam equipped to deal with unstructured meshes, or do they rely on the regular arrangement of a hexahedral structured mesh?

Insofar as the advantages of structured over unstructured are concerned in terms of discretisation accuracy, I'm aware that a structured mesh is much less likely to contain high aspect-ratio cells and that the orthogonality of the faces within the mesh to the wave particle orbit is also typically better for these in cases such as those that I'm simulating - shallow water waves - and that that will reduce the discretisation error. However, I've been finding that the quality of the wave and its pressure profile is affected significantly by the introduction of regions of refinement within the mesh such as one might put in surrounding a wave energy device or to increase resolution around the free surface, and I've pinned this to the unavoidable halving of cell edge length that takes place at the edge of an area of higher refinement when the mesh is assembled using blockMesh & snappyHexMesh: no matter what you set nCellsBetweenLevels to, there are still going to be multiple points at which the calculated results for one cell have to be split between two cells as the flow enters the more refined part of the mesh.

My thinking was to try out an unstructured mesh generated using gmsh, which should allow more gradual refinement and thus minimise its impact upon the wave conditions being simulated, but I've been unable to get the olaFoam solver to run with it. I've tried making the part of the mesh that's adjacent to the inlet and outlet structured, but that doesn't seem to help. The simulation seems to run fine if all wave-related BCs, libs and solvers are removed from the case and I just use interFoam, so I'm thinking that the problem must be olaFoam-related and would appreciate any advice that you might have.
Thanks,
James
jbcourt is offline   Reply With Quote

Old   September 26, 2017, 04:08
Default wave Oscillations problem
  #166
New Member
 
Join Date: Mar 2016
Posts: 17
Rep Power: 10
dupeng is on a distinguished road
Hi, foamers
I used olaFoam testing a simple StokesII wave. The waves at first look good, but when it evolves, some oscillations occur. Please see the attachment figures. Does anybody have an idea? Thanks.
Attached Images
File Type: jpg Untitled 1.jpg (42.6 KB, 88 views)
File Type: png x_eta.png (14.2 KB, 100 views)
dupeng is offline   Reply With Quote

Old   September 26, 2017, 22:45
Default
  #167
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Dear James,

the boundary conditions in olaFoam work for any arbitrary mesh.

You are right, the way OpenFOAM treats the VOF advection is not ideal, and faces many problems when reaching non-conformal areas (i.e., refinement areas where faces split into two). There are 2 ways to deal with this effect, and I have used both.
- First is dynamic mesh refinement along the free surface; the free surface will never reach the non-conformal cells because it should always be inside the refinement region. This method is computationally costly.
- The second method is to refine beforehand the regions where free surface is going to be located during the simulation. This method might require you to perform some iterations, but I have used it very often with good results.

Quick question, are you running floating bodies? I have often found those cases to blow up not because of the BCs/solver but because the wave dynamics trigger large pressure instabilities on the floating bodies, which are not that important for other dynamics (e.g., setting an initial perturbation on the free surface).

Keep tuned, I will elaborate more on this topic next week.

Hi dupeng,

your conditions are in intermediate waters, which is not an ideal condition for the absorption conditions that are developed under the shallow water regime. Nevertheless the mesh resolution might also be playing a role there. If you send me the case I will take a look.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   September 28, 2017, 03:22
Default wave Oscillations problem
  #168
New Member
 
Join Date: Mar 2016
Posts: 17
Rep Power: 10
dupeng is on a distinguished road
Hi, Pablo
You can find my case in the attachment. I used the wave boundary conditions with interFoam. You can generate the mesh using blockMesh, and topoSet and refineMesh to refine the wave region. Oscillations should occur when the time is long enough, in my case is about 20s.

Another problem confusing me is that the wave phase doesn't correspond with the theory. It seems to be inverse. Can you take a look at that too? Thanks.
Attached Files
File Type: zip StokesII.zip (10.1 KB, 38 views)
dupeng is offline   Reply With Quote

Old   September 28, 2017, 03:30
Default
  #169
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Thanks, I will hopefully get back to you next week.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   September 28, 2017, 23:28
Smile Wave forces on coastal dyke
  #170
aji
New Member
 
Surrey
Join Date: Aug 2017
Posts: 13
Rep Power: 8
aji is on a distinguished road
Quote:
Originally Posted by ms411 View Post
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
Attachment 46984

Attachment 46985

Attachment 46986

Attachment 46987

Attachment 46988
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;
}
)
Hi Ms411
I am a new user of openfoam struggling on olaFoam tutorials.I have a few questions for you as my task is nearly same as yours and I hope you already solve them
1) how did you create the trapezoid geometry? ( I done with 24 points but I felt if I can add more points on blockmesh vertices then my mesh will become more smoother but I don't know how to do that?)
2) How did you create your wave ? ( I just done the dambreak to create the wave. I dont know how to create normal waves and solitons?)
3) How did you post process your results and figure out the impact forces on a specific point?
I am looking forward to your answer. many thanks in advance. your answers will take me couple of steps forward.
aji is offline   Reply With Quote

Old   October 4, 2017, 02:02
Default
  #171
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Dupeng,

it is weird that you are generating the waves at x=30 m and making them propagate in the -x direction, although it is completely fine. However, keep in mind that the phase corresponds to the conditions at x=0 m and t=0 s. The formula for free surface is: eta = H/2 cos(k*x - w*t + phase), that is why you might be encountering discrepancies.

Regarding the free surface oscillations, I do not have a clue where you have found or how you came up with the numerical schemes and parameters that you use for the simulation. Your fvSchemes and fvSolution are not suitable for wave simulations and degrade the solution badly. Please use the ones that I attach instead. As you can see from my snapshot (bottom) vs yours (top) and the time series from my files, everything is working correctly.

Best,

Pablo
Attached Images
File Type: jpg waveComp.jpg (22.3 KB, 91 views)
File Type: jpg freeSurface.jpg (53.9 KB, 85 views)
Attached Files
File Type: zip fvFiles.zip (1.3 KB, 70 views)
Phicau is offline   Reply With Quote

Old   October 4, 2017, 03:05
Default
  #172
New Member
 
Join Date: Mar 2016
Posts: 17
Rep Power: 10
dupeng is on a distinguished road
Thanks for your suggestions Pablo,
I am trying the wave BCs for ships, so some changes have to be made. Maybe some of them are not appropriate, I will test your suggestions.

Regards,

Peng DU
dupeng is offline   Reply With Quote

Old   October 11, 2017, 08:26
Default
  #173
New Member
 
James Bridgwater Court
Join Date: Jan 2016
Posts: 14
Rep Power: 10
jbcourt is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Dear James,

the boundary conditions in olaFoam work for any arbitrary mesh.

You are right, the way OpenFOAM treats the VOF advection is not ideal, and faces many problems when reaching non-conformal areas (i.e., refinement areas where faces split into two). There are 2 ways to deal with this effect, and I have used both.
- First is dynamic mesh refinement along the free surface; the free surface will never reach the non-conformal cells because it should always be inside the refinement region. This method is computationally costly.
- The second method is to refine beforehand the regions where free surface is going to be located during the simulation. This method might require you to perform some iterations, but I have used it very often with good results.

Quick question, are you running floating bodies? I have often found those cases to blow up not because of the BCs/solver but because the wave dynamics trigger large pressure instabilities on the floating bodies, which are not that important for other dynamics (e.g., setting an initial perturbation on the free surface).

Keep tuned, I will elaborate more on this topic next week.

Hi dupeng,

your conditions are in intermediate waters, which is not an ideal condition for the absorption conditions that are developed under the shallow water regime. Nevertheless the mesh resolution might also be playing a role there. If you send me the case I will take a look.

Best,

Pablo
Thanks for your advice Pablo - sorry it's taken me so long to get back to you on it! I'm not running floating bodies, no - at least not yet: I've actually taken my NWT back to basics and am trying to optimise the wave generation fidelity in a target region of the mesh which will contain a wave energy device (this could be a floating body or a bottom-hinged flap), which was where the issues with changing the refinement level in the direction of wave propagation came about, but this was with an empty 2D tank.

I can give dynamic refinement around the interface a try, as I haven't done it before, but I've found that your second suggestion - introducing a "wave zone" of increased refinement around the water surface, something that I've used in the past - tends to lead to issues with the calculation of the velocity and pressure at the transition between wave zone and background mesh i.e. due to the change in refinement in the vertical (z) direction. This is presumably again due to the unavoidable halving of cell edge length at that transition point, but I think may be less of an issue once I return to 3D simulations since I don't remember noticing it in earlier iterations of my NWT.

I've seen from my own investigations that olaFoam's wave generation is reasonably sensitive to background mesh density and the uniformity of the mesh at the inlet boundary from its base to the highest point that waves will reach, so my findings thus far from this would seem to indicate that I need to have the highest level of refinement (that which provides adequate fidelity and a good fit to the WEC geometry) from the inlet up to sufficiently beyond the WEC location that reflections are no longer an issue, subject to my managing to get waves working with the unstructured mesh. If that's the case, I suppose it's a hit that I'll have to take on computational burden.
Thanks,
James
jbcourt is offline   Reply With Quote

Old   November 24, 2017, 11:52
Default foam-extend-4.0
  #174
New Member
 
Join Date: Oct 2017
Posts: 1
Rep Power: 0
griet is on a distinguished road
Hello everybody,

Does someone know if there is already a version of olaFoam/olaDyMFoam available for foam-extend-4.0?

Thanks in advance!

Griet
griet is offline   Reply With Quote

Old   November 25, 2017, 04:26
Default
  #175
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Griet,

yes, I have made it compatible, get the latest version: https://github.com/phicau/OLAFOAM

Dear all,

I don't know whether you have noticed, but olaFoam will change its name very soon:

olaFoam is changing name

More news to come on the new name and new features!

Pablo
Phicau is offline   Reply With Quote

Old   December 5, 2017, 00:23
Default PorosityIndex Field
  #176
New Member
 
Muhammad Hanis
Join Date: Apr 2017
Location: Kuala Lumpur, Malaysia
Posts: 9
Rep Power: 9
mhanis38 is on a distinguished road
Hello everyone,

First of all, I am still new with OF. Currently, i am using OLAFOAM/wavemakerflume/runPiston to simulate the breaking wave phenomenon.

After I run the case, I got this error.

" blockMesh meshing...
snappyHexMesh meshing...
Preparing 0 folder...
Setting the fields...
Creating piston wavemaker movement...
Running...


--> FOAM FATAL ERROR:
Check the number of components for aPor, bPor, dPor, phiPor and D50Por within porosityDict or the maximum index within porosityIndex field

FOAM exiting

Simulation complete"


| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object porosityDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Materials: clear region, core, secondary armour layer, primary armour layer
a 4(0 50 50 50);
b 4(0 1.2 2.0 0.6);
c 4(0 0.34 0.34 0.34);

D50 4(1 0.01 0.035 0.12);
porosity 4(1 0.49 0.493 0.5);

//

Could anyone explain how to determine the number/coordinate of the porosity ?

Thank you.

Kind regards,
Han
mhanis38 is offline   Reply With Quote

Old   December 5, 2017, 01:00
Default
  #177
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Han,

you provide very little information to solve your problem.

wavemakerFlume tutorial does not involve porosity, so, are you trying to put a porous structure into this tutorial? In that case investigate and understand fully the breakwater tutorial and read the reference manual, they provide all the information that you need.

Regarding the specific error that you see on the screen, the porosityDict looks good to me, so check your porosityIndex field in the 0 folder. It should have indices (integer numbers) from 0 to 3 (maximum).

Best,

Pablo
Phicau is offline   Reply With Quote

Old   December 5, 2017, 01:50
Default
  #178
New Member
 
Muhammad Hanis
Join Date: Apr 2017
Location: Kuala Lumpur, Malaysia
Posts: 9
Rep Power: 9
mhanis38 is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Han,

you provide very little information to solve your problem.

wavemakerFlume tutorial does not involve porosity, so, are you trying to put a porous structure into this tutorial? In that case investigate and understand fully the breakwater tutorial and read the reference manual, they provide all the information that you need.

Regarding the specific error that you see on the screen, the porosityDict looks good to me, so check your porosityIndex field in the 0 folder. It should have indices (integer numbers) from 0 to 3 (maximum).

Best,

Pablo
Thank you for your swift reply Pablo.

Sorry for mislead information here.

I am using wavemakerflume tutorial with some additional information from breakwater tutorial (snappyhexmesh).

Since in my experimental setup, I'm using piston wave-maker to generate the wave and there is a vertical wall in the tank.

So, I would like to know what is the function of porosity index and how we determine the number of components for aPor, bPor, dPor, phiPor and D50Por ?

Thank you.

Regards,
Han
mhanis38 is offline   Reply With Quote

Old   December 5, 2017, 02:29
Default
  #179
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Han,

since you do not have any porous structure (e.g. rubble mound breakwater), you can forget about porosity. Just delete the porosityDict and porosityIndex files.

Pablo
Phicau is offline   Reply With Quote

Old   December 5, 2017, 03:38
Default
  #180
New Member
 
Muhammad Hanis
Join Date: Apr 2017
Location: Kuala Lumpur, Malaysia
Posts: 9
Rep Power: 9
mhanis38 is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Han,

since you do not have any porous structure (e.g. rubble mound breakwater), you can forget about porosity. Just delete the porosityDict and porosityIndex files.

Pablo
Thanks for the information Pablo.

Since in breakwater tutorial, there is caisson.stl as the snappyhexmesh, meanwhile the core.stl, primLayer.stl & secLayer.stl was act as the porosity.

Based on your advise, I will delete primLayer together with secLayer, just remain the core.stl because I try make some adjustment on the core.stl to be my slope surface.

Can I change the parameter for core.stl which is set to be porosity to be include in the snappyhexmesh like caisson ? Or just remain it as the porosity but change the number of component ?

Thank you.

Regards,
Han
mhanis38 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 7, 2019 23:34
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 04:17
UDF velocity profile willroca Fluent UDF and Scheme Programming 2 January 10, 2016 03:13
Error messages atg enGrid 7 August 30, 2013 11:16
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 14:37


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