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

[waves2Foam] Waves2Foam Related Topics

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

Like Tree162Likes

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2013, 00:41
Default
  #541
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning,

I had forgotten that the definition of the cyclic patches has changed. Please search the forum to identify how to convert the old (pre OF2.0) format to the present formulation. There are plenty of threads on that topic - or simply read through the release notes on openfoam.org.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is online now  

Old   October 14, 2013, 23:55
Default
  #542
Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 99
Rep Power: 13
Maralady is on a distinguished road
Hello Niels, thanks for your reply, I have been looking the tutorials folders and found that at the 0 folder for the waveFlume all the files are .org, now I understand from the interFoam tutorial that I only need 1 .org file and that one is the alpha1 file, so my question is: It is the same with this case? Should all the files be regular files and should I have only 1 .org file (the alpha1.org file)

When I try to use setFields I get the following error:

--> FOAM FATAL IO ERROR:
cannot open file

file: /home/arthur/OpenFOAM/arthur-2.2.1/applications/utilities/waves2Foam/tutorials/waveFoam/waveFlume/system/setFieldsDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 87.

FOAM exiting


However I can create the mesh and even check the mesh without having any warning

Any suggestion??
Maralady is offline  

Old   October 15, 2013, 00:25
Default
  #543
Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 99
Rep Power: 13
Maralady is on a distinguished road
Just find out at this forum what I was doing wrong, the general process is:

blockMesh, setWaveParameters, setWaveField, waveFoam

My bad, I guess I will read the whole forum and re-read the wiki again before ask any other question

But as 1 last thing Mr.Niels, I want to simulate 2D waves in different geometries with NO floating bodies on the water, what tutorials would you recommend me? (So far I think that relaxationZone and waveFlume are enough to work on my project but not quite sure) thanks for your time and THANKS for doing such a nice work with this application
Maralady is offline  

Old   October 16, 2013, 00:46
Default
  #544
New Member
 
Peter
Join Date: Oct 2013
Posts: 1
Rep Power: 0
peter_w is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Sri,

In your specific case it should read

Code:
export WAVES_DIR=$HOME/Desktop/waves2Foam
Kind regards

Niels
Hi mate,
Where do you type that export... line? in the terminal? Or as a line in the bashrc file? Or as a line in the Allwmake file?
Thanks in advance,
Peter
peter_w is offline  

Old   October 17, 2013, 15:37
Default
  #545
Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 99
Rep Power: 13
Maralady is on a distinguished road
Neils I need to change the wavesProerties file, and I was wondering if I change the depth of the water at this file, do I have to modify the geometry? Because I am not sure if those 2 are truly linked, hope you understand my question

greetings
Maralady is offline  

Old   October 22, 2013, 12:19
Default modelling waves crashing into a fixed structure
  #546
New Member
 
Imogen Wright
Join Date: Oct 2013
Posts: 2
Rep Power: 0
mojface is on a distinguished road
I'd like to model open ocean waves in shallow water crashing into and passing a fixed wall for a personal project. I come from a computer science/physics background but am very new to CFD.

Could anyone point me to a tutorial that would help with this? I've been playing with the 3Dwaves tutorial but I can't seem to draw a solid wall - however I set up the mesh and initial conditions the waves seem to go straight though my wall.

What am I missing?
mojface is offline  

Old   October 22, 2013, 13:15
Default
  #547
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good evening,

I will try to catch up after some time offline:

@Peter: You should modify the file waves2Foam/bin/bashrc.

@Arthur: Please read the posts by Katakgoreng above, as he recently asked the exact same question.

@Imogen: I suppose that you are using OpenFoam-2.2? The 3Dwaves tutorial is not fully functioning under more recent versions, because the faceSet-utility was replaced by topoSet. This means that it is not possible to create the inner wall without modifying the tutorial.
At least the part with faceSet needs to be modified. See the Allrun script for details on the execution.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is online now  

Old   October 22, 2013, 17:51
Default
  #548
New Member
 
Imogen Wright
Join Date: Oct 2013
Posts: 2
Rep Power: 0
mojface is on a distinguished road
Dear Niels,

Thank you so much for your prompt reply, and thank you for maintaining this incredibly useful tool!

I've managed to convert the faceSet piece of the 3DWaves example to a working topoSet. However, when I run createBaffles I now get the following error:

Code:
--> FOAM FATAL IO ERROR: 
incorrect first token, expected <label> or '(' or '{', found on line 0 the word 'internalWall'

file: IStringStream.sourceFile at line 0.

    From function operator>>(Istream&, FixedList<T, Size>&)
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/FixedListIO.C at line 71.

FOAM exiting
My topoSetDict looks like:

Code:
actions
(
  {
    name    f0;
    type    faceSet;
    action  new;
    source  boxToFace;
    sourceInfo
    {
      box (74.9 -6 59.9) (75.1 3 90.1);
    }
  }

  {
    name    f0;
    type    faceSet;
    action  add;
    source  boxToFace;
    sourceInfo
    {
      box (74.9 -6 59.9) (100.1 3 60.1);
    }
  }

  {
    name    f0;
    type    faceSet;
    action  add;
    source  patchToFace;
    sourceInfo
    {
      name internalWall;
    }
  }


  {
    name    zoneSet;
    type    faceZoneSet;
    action  new;
    source  setToFaceZone;
    sourceInfo
    {
      faceSet f0;
    }
  }

);
Any ideas?

Cheers,

Imogen

Last edited by mojface; October 22, 2013 at 17:53. Reason: changing quote to code
mojface is offline  

Old   October 23, 2013, 17:52
Default
  #549
Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 99
Rep Power: 13
Maralady is on a distinguished road
It is Tsoft the period? How can I define the wave Period?
Maralady is offline  

Old   October 23, 2013, 21:57
Default
  #550
Member
 
Gregoire Junqua
Join Date: Jun 2011
Location: China
Posts: 58
Blog Entries: 1
Rep Power: 14
gregjunqua is on a distinguished road
Quote:
Originally Posted by Maralady View Post
It is Tsoft the period? How can I define the wave Period?
Hi
Nope it's should be set with the wave period depending your experiment but it's not the period

From the wiki : http://openfoamwiki.net/index.php/Contrib/waves2Foam
"Tsoft should be given a value of 0.0; Tsoft is typically set to the wave period as default and is not required by most of the wave theories. "

It is the same file waveProperties
Just after you would found
// Water depth at the boundary and in the relaxation zone depth 0.400000; // Period - needed by setWaveParameters -> yields omega period 2.0; // Cyclic wave frequency omega 3.141593;
gregjunqua is offline  

Old   October 24, 2013, 00:47
Default
  #551
Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 99
Rep Power: 13
Maralady is on a distinguished road
I do not have this line

// Period - needed by setWaveParameters -> yields omega period 2.0;

At my file, do I have to write it by myself?
Maralady is offline  

Old   October 28, 2013, 12:56
Default
  #552
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Arthur,

Try to execute the

Code:
setWaveParameters
utility. It will complain, if essential parameters are not defined in waveProperties.org. As should also be clear from the wiki, the required parameters depend on the wave theory that you use.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is online now  

Old   October 28, 2013, 22:31
Default
  #553
Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 99
Rep Power: 13
Maralady is on a distinguished road
I think I have been doing all this the wrong way, when I type: setWaveParameters I get:

Create time


Reading g

Reading waveProperties



--> FOAM FATAL IO ERROR:
cannot find file

file: /home/arthur/OpenFOAM/arthur-2.2.1/applications/utilities/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.input at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting


I will try to change the waveProperties to waveProperties.input, would this work or it is recommended to copy the file instead and have 3 files, waveProperties, waveProperties.org and waveProperties.input?
Maralady is offline  

Old   October 29, 2013, 12:40
Default
  #554
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good evening Arthur,

I will recommend to look at the bejiBatjess tutorial, because it actually uses the setWaveParameters utility, as you can confirm yourself by lookkng at the table on the wiki.

Also for the future, I believe you will safe time and learn more, if you test your thougths instead of sitting and waiting for answers.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is online now  

Old   October 29, 2013, 20:01
Default
  #555
Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 99
Rep Power: 13
Maralady is on a distinguished road
Actually I ran several simulations by now but I have the 3 files and I wanted to know your opinion about it, as one last thing, I would like to change the geometry from the waveFlume tutorial, do you have any recommendations?
Maralady is offline  

Old   October 31, 2013, 12:49
Default
  #556
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Arthur,

Then I would recommend that you begin by reading the user guide on how to use either blockMesh or snappyHexMesh. There are also a huge number of threads on both topics elsewhere on this forum.

It should be a good starting point.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is online now  

Old   November 2, 2013, 00:52
Default
  #557
Member
 
Arthur Loginow
Join Date: Aug 2012
Posts: 99
Rep Power: 13
Maralady is on a distinguished road
Dear Neils, thank you for all your replies, I would like to know if you can help me to understand something, I have some doubts about the set up of the waveFlume tutorial and here is why (Please forgive me if someone made this question before, I am trying to catch up with all the information in here but it is a pretty long discussion):

The waveFlume tutorial is to understand the waveProperties file, or at least that is the main purpose, the waveProperties files looks like this (Just the wave properties):


// Wave type to be used at boundary "inlet" and in relaxation zone "inlet"
waveType stokesFirst;

// Ramp time of 2 s
Tsoft 1.94;

// Water depth at the boundary and in the relaxation zone
depth 1;

// Cyclic wave frequency
omega 3.141593;

// Phase shift in the wave
phi 0.000000;

// Wave number vector, k.
waveNumber (1.25664 0.0 0.0);

// Wave height
height 0.1;


And the input needed for StokesFirst it is the following:

waveType stokesFirst;
depth <scalar>;
period <scalar>;
direction <vector>;
phi <scalar>;
height <height>;
Tsoft <scalar>; // Not required

Do the period and direction properties have a default value? The program recognize that the user must specify both, but only if the user runs the setWaveField which is not needed in order to run this tutorial, I would like to know this because even when it sounds silly, I think that I am missing information somewhere. (I red that Tsoft is taken as the period when the period is not specified that is why I am assuming that they both have default values)

Thanks for your time

Maralady is offline  

Old   November 3, 2013, 11:52
Default
  #558
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Arthur,

The properties you list are only needed by the setWaveParameters utility (not the setWaveField, as you write). setWaveParameters is basically a calculator, which transform "easy" physical parameters such as wave period, water depth, wave height and direction into the variables, which are needed to compute the wave kinematics, dynamics and free surface. The latter parameters are the cyclic frequency, the wave number vector and other variables that depend on the chosen wave theory.

All these parameters are linked through a given potential wave theory, where the specific link for stokesFirst is the linear dispersion relation.

The waveFlume tutorial is not designed specifically to understand the waveProperties file, it is merely a part of it. It also illustrates the use of relaxation zones, initiation of variables, etc. But since the waveFlume tutorial do not use setWaveParameters, it does not need the wave period and the direction.

The definition of the default value for Tsoft is for each wave theory directly understood from its constructor in the .C-file. You can also study the setWaveProperties-directory and the corresponding file for each wave theory to get a better understanding on the linkage between parameters needed for setWaveParameters and parameters needed to execute waveFoam.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is online now  

Old   November 4, 2013, 15:01
Default Ide
  #559
Member
 
Join Date: Dec 2009
Posts: 49
Rep Power: 16
katakgoreng is on a distinguished road
Hi Niels,

I will be working with waves2Foam and do some extension/modification to the current code. Just out of curiosity, did you use any IDE (Eclipse, Netbean, etc) for the development of waves2Foam toolbox? I just want to weigh my option whether to use IDE or just stick with text-based editor like Vim or emacs.

Kind regards,
katakgoreng
katakgoreng is offline  

Old   November 5, 2013, 02:18
Default
  #560
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning Katakgoreng,

Yes, I am using Eclipse. It works quite nicely for something like development of new libraries, however, I have not been successful (and have hardly tried) in getting the auto-completion working within the solvers.

Good luck,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is online now  

Closed Thread

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
Re-Project topics protocol STAR-CCM+ 0 March 22, 2016 05:25
Waves2Foam Related Topics seoseonguk OpenFOAM Running, Solving & CFD 0 March 1, 2016 22:18
Waves2Foam Related Topics seoseonguk OpenFOAM Running, Solving & CFD 0 March 1, 2016 22:14
Error: "Cannot find file points" related to changing parallelized code to serial? Suyf OpenFOAM Running, Solving & CFD 0 February 12, 2015 04:31


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