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

[waves2Foam] Having difficulty setting up wave gauges

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2023, 21:56
Post Having difficulty setting up wave gauges
  #1
New Member
 
Wangh
Join Date: Nov 2022
Posts: 4
Rep Power: 3
wangwang is on a distinguished road
Hi everyone,

I am having some issues with setting up wave gauges using waves2Foam. I am new to waves2Foam and I want to set up wave gauges in my case. I have done the following: 1. Copied the constant/probesDefinitions from the wave flume tutorial to my constant folder; 2. Added the following to my controlDict file:
Quote:
functions { #includeIfPresent "../waveGaugesNProbes/surfaceElevationAnyName_controlDict"; }
; 3. Added the command
Quote:
# Create the wave probes runApplication waveGaugesNProbes
to my Allrun file. However, when I run the case, I do not see a postProcessing folder or the expected wave gauge data. How can I correctly set up the wave gauge ?
My probesDefinitions, controlDict, and Allrun are shown below:

Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object loggingProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

surfaceElevationAnyName
{
type waveGauge;
libs ("libwaves2Foam.so")
pointDistribution lineDistribution;
N 3;
linestart (0.10 0.005 0.0);
lineend (3.2 0.005 0.0);
add ( 0 0 0.55);
axis z;
stretch 1.;

// REQURIED ONLY FOR NEW FUNCTIONOBJECT IMPLEMENTATION
writeControl adjustableRunTime;
writeInterval 0.025;
}
Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application interFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 1;

deltaT 0.005;

writeControl adjustable;

writeInterval 0.05;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.5;

maxAlphaCo 0.5;

maxDeltaT 0.5;

functions
{
#includeIfPresent "../waveGaugesNProbes/surfaceElevationAnyName_controlDict";
}

Quote:
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------

restore0Dir

runApplication blockMesh


# Create the wave probes
runApplication waveGaugesNProbes

runApplication decomposePar

runParallel setFields

runParallel $(getApplication)
thanks
wangwang is offline   Reply With Quote

Old   January 4, 2024, 17:11
Default
  #2
New Member
 
Narayan Kumar
Join Date: Feb 2023
Location: Newark , DE
Posts: 18
Rep Power: 3
Narayan_UD is on a distinguished road
Would you like to do it step-by-step manually without Allrun?

May be you will be able to find the issue
Narayan_UD is offline   Reply With Quote

Old   January 20, 2024, 07:39
Default
  #3
New Member
 
Wangh
Join Date: Nov 2022
Posts: 4
Rep Power: 3
wangwang is on a distinguished road
Quote:
Originally Posted by Narayan_UD View Post
Would you like to do it step-by-step manually without Allrun?

May be you will be able to find the issue
Hello! I was a newbie to OpenFOAM at that time, but now this problem has been solved. thank you for your reply!
wangwang is offline   Reply With Quote

Old   February 22, 2024, 05:05
Default
  #4
New Member
 
Marion Sant
Join Date: Dec 2023
Posts: 23
Rep Power: 2
edo2822 is on a distinguished road
Quote:
Originally Posted by wangwang View Post
Hello! I was a newbie to OpenFOAM at that time, but now this problem has been solved. thank you for your reply!
Dear wangwang,
I'm experiencing the same problem. Would you mind sharing your solution?
edo2822 is offline   Reply With Quote

Old   February 22, 2024, 07:59
Default
  #5
New Member
 
Wangh
Join Date: Nov 2022
Posts: 4
Rep Power: 3
wangwang is on a distinguished road
Quote:
Originally Posted by edo2822 View Post
Dear wangwang,
I'm experiencing the same problem. Would you mind sharing your solution?
Dear edo2822,

I managed to resolve this issue by linking the wavesFoam library. You can do this by adding the following code to your controlDict:
Code:
functions
{
    libs ("libwaves2FoamSampling.so");
    #includeIfPresent "../waveGaugesNProbes/surfaceElevationAnyName_controlDict";
}
Please note that you should replace ‘surfaceElevationAnyName’ with the name of your wave gauge. I hope this solution proves helpful to you.
wangwang is offline   Reply With Quote

Old   February 22, 2024, 08:47
Default
  #6
New Member
 
Marion Sant
Join Date: Dec 2023
Posts: 23
Rep Power: 2
edo2822 is on a distinguished road
Quote:
Originally Posted by wangwang View Post
Dear edo2822,

I managed to resolve this issue by linking the wavesFoam library. You can do this by adding the following code to your controlDict:
Code:
functions
{
    libs ("libwaves2FoamSampling.so");
    #includeIfPresent "../waveGaugesNProbes/surfaceElevationAnyName_controlDict";
}
Please note that you should replace ‘surfaceElevationAnyName’ with the name of your wave gauge. I hope this solution proves helpful to you.
Thank you! It seems to be working. I
edo2822 is offline   Reply With Quote

Old   February 24, 2024, 07:02
Default
  #7
New Member
 
Narayan Kumar
Join Date: Feb 2023
Location: Newark , DE
Posts: 18
Rep Power: 3
Narayan_UD is on a distinguished road
Quote:
Originally Posted by edo2822 View Post
Thank you! It seems to be working. I

its worked for me also
Narayan_UD is offline   Reply With Quote

Old   February 28, 2024, 04:07
Default
  #8
New Member
 
Marion Sant
Join Date: Dec 2023
Posts: 23
Rep Power: 2
edo2822 is on a distinguished road
Quote:
Originally Posted by wangwang View Post
Hello! I was a newbie to OpenFOAM at that time, but now this problem has been solved. thank you for your reply!
Hi wangwang!
Have you ever used the cnoidalFirst wave theory in waves2foam?
I'm trying to run a simulation with that and the setWaveFields fails.
I'll attach a folder with the log file and my setWaveField file if you have any clue!
Attached Files
File Type: zip log.cnoidal.zip (2.3 KB, 5 views)
edo2822 is offline   Reply With Quote

Old   March 15, 2024, 20:17
Default
  #9
New Member
 
Wangh
Join Date: Nov 2022
Posts: 4
Rep Power: 3
wangwang is on a distinguished road
Hi edo2822:
I'm sorry to tell you that I have never used elliptical cosine waves, but I see that you are using version 2206. Have you tried lower versions, such as 1912, I really don't know about gabc.
Good luck!
wangwang is offline   Reply With Quote

Reply

Tags
wave guage. waves2foam


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
Does the default wall in Fluent reflects 100% acoustic wave energy? czx0415 FLUENT 4 April 8, 2023 16:36
How to Install Numerical Wave and Pressure Gauges in the Numerical Wave Tank? mushtak Main CFD Forum 0 November 2, 2020 02:34
[OLAFLOW] The height of wave generated by OF1806 is too small compared to theorectical wave Robin86 OpenFOAM Community Contributions 5 December 9, 2018 20:20
[IHFOAM] The height of wave generated by OF1806 is too small compared to theorectical wave Robin86 OpenFOAM Community Contributions 0 December 6, 2018 21:20
[waves2Foam] Stokesfirst wave profile asymetrical against the still water level?? zhxter OpenFOAM Community Contributions 2 March 23, 2015 12:08


All times are GMT -4. The time now is 16:38.