|
[Sponsors] |
November 19, 2021, 06:40 |
|
#261 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Qi Yang,
Yes, forward means waves and current travel in the X+ direction. Backward means waves travel in X+ and current in X-. There are 3 places that you need to monitor to set the current: 0/U for the absorption boundary, constant/waveDict for the wave generation boundary and (optional) system/setFields to set the initial condition. All need to be consistent. A very easy way to proceed is to run the currentWaveFlume tutorial included in olaFlow. Start by running the case conditions that are closer to what you want to obtain (select options 1-4 in the runCase script). Then kill the simulation and study how the files look like. Finally, adapt the case to your particular needs. Your numerical setup seems to have some issues. Probably you selected a wrong BC or configuration, since the water level seems to increase with time in your simulation. Note that this does not happen if you set everything correctly (as is in the currentWaveFlume tutorial). I have compared the pressure for the cases with waves only (red line) and waves + forward and waves + backward currents (red lines) and the results are perfect. Best, Pablo |
|
November 19, 2021, 10:42 |
|
#262 | |
Senior Member
|
Quote:
alpha.water Code:
dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { "cylinder.*" { type zeroGradient; } "inlet.*" { type waveAlpha; waveDictName waveDict; value uniform 0; } "sides.*" //frontAndBack { type symmetry;//empty; } "outlet.*" { type zeroGradient; } "ground.*"//bottom { type zeroGradient; } "top.*"//atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } } Code:
dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { "cylinder.*" { type fixedFluxPressure; value uniform 0; } "sides.*"//frontAndBack { type symmetry;//empty; } "outlet.*" { type fixedFluxPressure; value uniform 0; } "inlet.*" { type fixedFluxPressure; value uniform 0; } "ground.*"//bottom { type fixedFluxPressure; value uniform 0; } "top.*"//atmosphere { type totalPressure; U U; phi phi; rho rho; psi none; gamma 1; p0 uniform 0; value uniform 0; } } Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { "cylinder.*" { type fixedValue; value uniform (0 0 0); } "inlet.*" { type waveVelocity; uCurrent (0 0 0); value uniform (0 0 0); } "outlet.*" { type waveAbsorption3DVelocity; value uniform (0 0 0); } "ground.*"//bottom { type fixedValue; value uniform (0 0 0); } "top.*"//atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } "sides.*"//frontAndBack { type symmetry;// empty; } } Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.00000001; boundaryField { "cylinder.*" { type kqRWallFunction; value uniform 1e-8; } "inlet.*" { type inletOutlet; inletValue uniform 0.00000001; value uniform 0.00000001; } "outlet.*" { type inletOutlet; inletValue uniform 0.00000001; value uniform 0.00000001; } "top.*"//atmosphere { type inletOutlet; inletValue uniform 0.00000001; value uniform 0.00000001; } "sides.*"//frontAndBack { type symmetry;// empty; } "ground.*"//bottom { type kqRWallFunction; value uniform 0.00000001; } } Code:
dimensions [0 0 -1 0 0 0 0]; internalField uniform 0.001; boundaryField { "cylinder.*" { type omegaWallFunction; value uniform 0.001; } "inlet.*" { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } "outlet.*" { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } "top.*"//atmosphere { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } "sides.*"//frontAndBack { type symmetry;// empty; } "ground.*"//bottom { type omegaWallFunction; value uniform 0.001; } } Code:
dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { "cylinder.*" { type nutkWallFunction; value uniform 0; } "inlet.*" { type zeroGradient; } "outlet.*" { type zeroGradient; } "top.*"//atmosphere { type calculated; value uniform 0; } "sides.*"//frontAndBack { type symmetry;// empty; } "ground.*"//bottom { type nutkWallFunction; value uniform 0; } } |
||
November 25, 2021, 18:36 |
|
#263 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Qi Yang,
Please follow my advice and start simple. 2D, no structure first, when it works, it is easy to extend to 3D and add the cylinder(s). -> A very easy way to proceed is to run the currentWaveFlume tutorial included in olaFlow. Start by running the case conditions that are closer to what you want to obtain (select options 1-4 in the runCase script). Then kill the simulation and study how the files look like. Finally, adapt the case to your particular needs. At a first glance: - The current should not be set to 0 in 0/U/inlet, it will be read from waveDict. - You should use waveAbsorption2DVelocity instead and set the current at the outlet. Best, Pablo |
|
December 1, 2021, 07:20 |
|
#264 | |
Senior Member
|
Quote:
Thanks for your suggestions. In fact, I reduced the domain length and the cells and I got the logical results. Do you think they are reasonable? The plot is the dynamic wave pressure at the bottom. Bests, |
||
May 19, 2022, 13:07 |
|
#265 |
New Member
AUbuntu
Join Date: Oct 2021
Posts: 6
Rep Power: 5 |
Dear Pablo,
I am trying to validate the solitary wave generated by olaFlow with theory. η(t,x)=H 〖sech〗^2 (κ (x-Ct)) In theory we have the below equation. T= 2h/C √(4h/3H) (3.8+H/h) for the period of the solitary wave. So I used T/2 to shift the theory equation to match with the start of the simulation. η(t,x)=H 〖sech〗^2 (κ (x-Ct-T/2)) but there is a phase difference between the results and I don't know how to justify it! Could you please let me know how I can fix this. Kind regards, Amir |
|
May 26, 2022, 11:44 |
|
#266 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Kimi,
Please refer to my previous post in which I showed you the time series already. Hi Amir, Wave period for a solitary wave is not defined in a universal way. Please check the source code for the definition in olaFlow: 4.0*PII/sqrt(3)*h/sqrt(H/h), that is probably the source of your phase difference. Best, Pablo |
|
June 30, 2022, 12:59 |
|
#267 |
New Member
Peicen Wang
Join Date: Nov 2021
Location: Shenzhen, China
Posts: 4
Rep Power: 5 |
Hello Pablo,
I've tried to run the tutorial case 'baseWaveFlumeNewAbs' from 'Dev' branch. I've not change anything of this tutorial case, and only run the './runCase' script. When this script execute the line 'olaFlow > olaFlow.log', the terminal outputs some errors, and olaFlow couldn't work well: Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : _7bdb509494-20201222 OPENFOAM=2012 patch=210414 Arch : "LSB;label=32;scalar=64" Exec : olaFlow Date : Jun 30 2022 Time : 23:11:43 Host : hpws13 PID : 12794 I/O : uncollated Case : /home/wpc/wpcdata/baseWaveFlumeNewAbs nProcs : 1 trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Selecting dynamicFvMesh staticFvMesh 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 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 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 = 0.00119048 PIMPLE: iteration 1 MULES: Solving for alpha.water alpha.water BC on patch inlet Wave Generation BC Wave theory: StokesI H: 10 T: 5 h: 130.156 L: 39.0327 Direction: 0? Generation in: Deep waters. Relative depth (kh): 20.9515 Phase-1 volume fraction = 0.765625 Min(alpha.water) = 0 Max(alpha.water) = 1 alpha.water BC on patch inlet MULES: Solving for alpha.water alpha.water BC on patch inlet Phase-1 volume fraction = 0.765625 Min(alpha.water) = 0 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 1, Final residual = 0.0281341, No Iterations 2 time step continuity errors : sum local = 6.76728e-07, global = 1.09967e-19, cumulative = 1.09967e-19 DICPCG: Solving for p_rgh, Initial residual = 0.013655, Final residual = 0.000664405, No Iterations 20 Velocity BC on patch inlet Wave Generation BC Wave theory: StokesI H: 10 T: 5 h: 130.156 L: 39.0327 Direction: 0? Generation in: Deep waters. Relative depth (kh): 20.9515 Active wave absorption BC on patch outlet "Initial water depths for absorption" 1( 130.156 ) Selecting active wave absorption model extendedRangeAWA AWA model: patch outlet Theory: extendedRangeAWA Number of paddles: 1 Reference water depth: 1(130.156) Wave period: 5 Updating extendedRangeAWA absorption model for patch outlet double free or corruption (out) Then I tested the tutorial 'baseWaveFlume' which was not using the extendedRangeAWA model in Ubuntu 20.04 system(OpenFOAM-v2012). And olaFlow worked very well. So I think there are no errors when I compiled the olaFlow codes. This error confused me a few days. Is this something to do with the system version that I am using to run ? Hope for your answer. Thanks Peicen Updated in July 1st 2022, 10:30 : This morning, I tried the tutorial case 'baseWaveFlumeNewAbs' in other work station whose system version is CentOS 7.9.2009 and OpenFOAM version is also v2012, and this tutorial runs very well. So I think there must be some difference between these work stations. Last edited by pcwang; June 30, 2022 at 23:29. |
|
August 26, 2022, 09:16 |
|
#268 | |
New Member
Tianqi Ma
Join Date: Nov 2018
Posts: 1
Rep Power: 0 |
Quote:
Did you solve the problem? I also have the same problem as you posted. The wave elevations at some locations are irregular. Thanks |
||
September 12, 2023, 18:37 |
Total displacement of the water when created a wave
|
#269 |
New Member
Sarah Aguiar
Join Date: Sep 2023
Posts: 10
Rep Power: 3 |
Hey everyone, I'm in a bit of a situation now. I created a mesh using blockmesh and basewaveflume tutorial like base, BUT my simulation goes crazy, it's like the wave created displace all the water of the ocean and become a tsuname. I'm sending the pics so you guys can understand better. I'm putting below my wave dict, fvschemes, and fvsolution here.
Dis you guys already saw something like this? Can help me or give me any tips? Thanks in advance. FVSCHEMES /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { div(rhoPhi,U) Gauss limitedLinearV 1; div(U) Gauss linear; div((rhoPhi|interpolate(porosity)),U) Gauss upwind 1; div(rhoPhiPor,UPor) Gauss upwind 1; div(rhoPhi,UPor) Gauss upwind 1; div(rhoPhiPor,U) Gauss upwind 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div((muEff*dev(T(grad(U))))) Gauss linear; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div((phi|interpolate(porosity)),k) Gauss upwind; div((phi|interpolate(porosity)),epsilon) Gauss upwind; div(phi,omega) Gauss upwind; div((phi|interpolate(porosity)),omega) Gauss upwind; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p_rgh; pcorr; alpha.water; } // ************************************************** *********************** // FVSOLUTION /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "alpha.water.*" { nAlphaCorr 1; nAlphaSubCycles 2; alphaOuterCorrectors yes; cAlpha 1; MULESCorr no; nLimiterIter 3; solver PCG; preconditioner DIC; tolerance 1e-07; relTol 0.05; } "pcorr.*" { solver PCG; preconditioner DIC; tolerance 1e-5; relTol 0; } p_rgh { solver PCG; preconditioner DIC; tolerance 1e-07; relTol 0.05; } p_rghFinal { $p_rgh; relTol 0; } U { solver PCG; preconditioner DIC; tolerance 1e-07; relTol 0.05; } } PIMPLE { momentumPredictor no; nOuterCorrectors 1; nCorrectors 3; nNonOrthogonalCorrectors 0; } relaxationFactors { fields { } equations { ".*" 1; } } // ************************************************** *********************** // WAVE DICT /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.3 | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object waveDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // waveType regular; waveTheory StokesII; genAbs 1; absDir 0.0; nPaddles 1; waveHeight 1.0; wavePeriod 4.05; waveDir 0.0; wavePhase 1.57079633; // Change both entries to true to re-read this dictionary upon restart. rereadAlpha false; rereadU false; // ************************************************** *********************** // |
|
October 24, 2024, 06:18 |
Wavemaker dict with no paddelposition and paddlevelocity
|
#270 |
New Member
Join Date: Sep 2024
Posts: 1
Rep Power: 0 |
Hi everyone. I am new in the model and in the solver so I'm sorry for my silly question.
I am running the basewaveFlume tutorial because I would like to replicate an experiment in lab. Running the base tutorial (with dynamic mesh), input surface elevation data (of waveDict) and output data extracted with numerical VOF gauge next to the wave generator point (polyline function) are the same. On the other hand, since my experiment doesn't have paddleposition data, I run the tutorial with static mesh with only surface elevation and time steps, with no paddle information. The extracted datas don't match the input values. They underestimate the input surface elevation values using both tveta or txeta theory. What I am doing wrong? I know that implementing paddleposition data in my wavedict and using txeta theory I could resolve this problem even in static mesh conditions but I have no infos about paddle in my experiment. I attach the graphs with and without paddleposition values. Thank You Alessandro wavemakerFlume_dynamic(with paddlepos).png wavemakerFlume_static(with no paddlepos).png |
|
Tags |
generation, ihfoam, olafoam, 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 |