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

[waves2Foam] Problem with waves2Foam coupled with OpenFOAM2.3.x

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

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2014, 06:37
Default Problem with waves2Foam coupled with OpenFOAM2.3.x
  #1
New Member
 
Michele Righi
Join Date: Feb 2014
Location: Pisa
Posts: 5
Rep Power: 12
Michele Righi is on a distinguished road
Hi everybody, I have compiled successfully the last git version of OpenFOAM 2.3.x.
Then I have recompiled the waves2Foam library and all works fine except the solver waveFoam.
The error is something like this:

waveFoam.C:96:39: error: ‘alphaOuterCorrectors’ was not declared in this scope

but the same file compiles fine with OpenFOAM2.3.0.

I don't understand what is the problem, and I have no idea on how go on, could someone help me please?

Thank you so much.

Michele
Michele Righi is offline   Reply With Quote

Old   May 31, 2014, 12:22
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Michele,

I am sorry to announce that I have decided not to support *.x versions. There is simply to much changes going on in between a single revision (e.g. apparently from 2.3.0 to 2.3.x) of OF for it to be feasible. The latest version working is therefore 2.3.0 (and foam-extend 3.0, where I am hoping to get waveFoam out this weekend).

If there are changes in 2.3.x, which you need, then I suggest to do

Code:
diff
(see "man diff" in the command line) on all involved files in waveFoam with those in interFoam for 2.3.x. That includes also the Make/options file. This should bring you closer to a solution.

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 offline   Reply With Quote

Old   June 1, 2014, 10:24
Default
  #3
New Member
 
Michele Righi
Join Date: Feb 2014
Location: Pisa
Posts: 5
Rep Power: 12
Michele Righi is on a distinguished road
Hi Niels, thank you for the reply and for the waves2Foam library!

I think I have already fixed the problem with the simple declaration of the "alphaOuterCorrectors" variable in the header file: OpenFOAM-2.3.x/src/finiteVolume/lnInclude.
Now I can compile without any error the waveFoam solver.

If it is possible I would have another question for you: why doesn't the surfaceElevation functionObiect work with dynamic mesh? (For example waveDyMFoam).

Thank you very much.
King regards.

Michele
Michele Righi is offline   Reply With Quote

Old   June 1, 2014, 11:11
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Michele,

It is good that you got it working.

With respect to the moving meshes, then I have not had problems with the simulations which I have performed on moving meshes. Furthermore, since I am restricting myself to deliver waves2Foam on static meshes, I find that it is more a community effort to figure out, what is going wrong - unfortunately I am not aware of such an effort among the waves2Foam users.

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 offline   Reply With Quote

Old   February 9, 2015, 13:29
Default
  #5
Member
 
carlos
Join Date: Apr 2011
Posts: 37
Rep Power: 15
CFD-Palma is on a distinguished road
Quote:
Originally Posted by Michele Righi View Post
Hi Niels, thank you for the reply and for the waves2Foam library!

I think I have already fixed the problem with the simple declaration of the "alphaOuterCorrectors" variable in the header file: OpenFOAM-2.3.x/src/finiteVolume/lnInclude.
Now I can compile without any error the waveFoam solver.

If it is possible I would have another question for you: why doesn't the surfaceElevation functionObiect work with dynamic mesh? (For example waveDyMFoam).

Thank you very much.
King regards.

Michele

Hi Michele,

I have the same problem and I do not understand where you declare the variable "alphaOuterCorrectors", because it should get a value from some statement to be compared in the if statement.
In the other hand, it may compile but not work, did you try it?

Thanks for your advice
CFD-Palma is offline   Reply With Quote

Old   February 15, 2015, 07:39
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: See commit 3c837948f19c4 in 2.3.x and you'll see what needs changing: https://github.com/OpenFOAM/OpenFOAM...c7396809f308ef
wyldckat is offline   Reply With Quote

Old   February 25, 2015, 09:02
Default
  #7
New Member
 
Jorge Gadelho
Join Date: Feb 2013
Posts: 22
Rep Power: 13
JGadelho is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: See commit 3c837948f19c4 in 2.3.x and you'll see what needs changing: https://github.com/OpenFOAM/OpenFOAM...c7396809f308ef
Thank you very much!
Just edited the original waveFoam.C and removed the cicle:

Code:
if (pimple.firstIter() || alphaOuterCorrectors)
and it worked for me!
JGadelho is offline   Reply With Quote

Old   March 1, 2015, 13:20
Default
  #8
Member
 
carlos
Join Date: Apr 2011
Posts: 37
Rep Power: 15
CFD-Palma is on a distinguished road
Hi All,

I post this here in case it helps .
I have managed to compile waveDyMFoam in OF 231, after straggling with the mixture error.
The way is to modify the the interDyMFoam solver as usual, but then the mixture not declare.... appears. The solution is to add in the waveDyMFoam folder the createFields.H from InterDyMFoam to avoid the compiler using the one in waveFoam folder. However this produces an error of include "readGravitationalAcceleration.H" as it is also defined in the solver, so I commented out.
The other possibility would be to remove the declaration from the solver, perhaps it would make sense since it is not in interDimFoam, but I have to see if it makes any difference.
So far it compiles and as far as I had time to test, it works.
By the way, the changes mentioned in the previous posts have already been included in 231.
CFD-Palma is offline   Reply With Quote

Old   March 4, 2015, 06:21
Default
  #9
Member
 
carlos
Join Date: Apr 2011
Posts: 37
Rep Power: 15
CFD-Palma is on a distinguished road
Just pointing up the fact that is not only the createFields.H file that has to be imported from the interDyMFoam, all files that mention mixture, some from the folder interFoam, should be imported to avoid the same error.

Regards,
Carlos
CFD-Palma is offline   Reply With Quote

Old   April 30, 2015, 04:13
Default
  #10
New Member
 
moh
Join Date: Nov 2014
Posts: 14
Rep Power: 11
mmbeik is on a distinguished road
hi everybody
I tried to compile waveFoam to OF 231 and had this error

mkdir: cannot create directory ‘’: No such file or directory
make: *** /waveFoam Error 1

now I dont know what the problem is.
pls help me to find out
thank u in advance
Regards
mmbeik is offline   Reply With Quote

Old   April 30, 2015, 11:25
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by mmbeik View Post
hi everybody
I tried to compile waveFoam to OF 231 and had this error

mkdir: cannot create directory ‘’: No such file or directory
make: *** /waveFoam Error 1

now I dont know what the problem is.
pls help me to find out
thank u in advance
Regards
Quick answer: the OpenFOAM shell environment is not activated. For more details: http://openfoamwiki.net/index.php/In...with_the_Shell
mmbeik likes this.
wyldckat is offline   Reply With Quote

Old   June 10, 2015, 11:45
Default
  #12
Member
 
Hao Chen
Join Date: Aug 2014
Posts: 66
Rep Power: 0
hchen is on a distinguished road
Hi Carlos,

Could you attach your modified wavesDyMFoam.C file?

Best regards
Hao

Quote:
Originally Posted by CFD-Palma View Post
Hi All,

I post this here in case it helps .
I have managed to compile waveDyMFoam in OF 231, after straggling with the mixture error.
The way is to modify the the interDyMFoam solver as usual, but then the mixture not declare.... appears. The solution is to add in the waveDyMFoam folder the createFields.H from InterDyMFoam to avoid the compiler using the one in waveFoam folder. However this produces an error of include "readGravitationalAcceleration.H" as it is also defined in the solver, so I commented out.
The other possibility would be to remove the declaration from the solver, perhaps it would make sense since it is not in interDimFoam, but I have to see if it makes any difference.
So far it compiles and as far as I had time to test, it works.
By the way, the changes mentioned in the previous posts have already been included in 231.
hchen is offline   Reply With Quote

Old   June 15, 2015, 11:09
Default waveDymFoam with OF 231
  #13
Member
 
carlos
Join Date: Apr 2011
Posts: 37
Rep Power: 15
CFD-Palma is on a distinguished road
Pls find attached the modified WDF.
Also added createFields.h with the mentioned modification.

Hoppe it helps
Carlos.
Attached Files
File Type: c waveDyMFoam.C (4.8 KB, 83 views)
File Type: h createFields.H (2.8 KB, 71 views)

Last edited by CFD-Palma; June 15, 2015 at 11:16. Reason: D'ont see attachements
CFD-Palma is offline   Reply With Quote

Old   August 5, 2015, 10:40
Default
  #14
New Member
 
Join Date: Aug 2013
Posts: 10
Rep Power: 13
Ellie is on a distinguished road
Quote:
Originally Posted by CFD-Palma View Post
Pls find attached the modified WDF.
Also added createFields.h with the mentioned modification.

Hoppe it helps
Carlos.
Hi Carlos,

Thanks for sharing your experience!
I am doing all the procedures as you written here. Finally, I am having a problem with the "immiscibleIncompressibleTwoPhaseMixture" as below


There is no "immiscibleIncompressibleTwoPhaseMixture" in OpenFoam-2.3.0. So I copied all files of "immiscibleIncompressibleTwoPhaseMixture" from OpenFoam-2.4.0 and compiled it sucessfully. Then when I compiled waveDyMFoam and fix all the problems you stated above. I got the following error

-lm -o /home/ellie/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/waveDyMFoam
Make/linux64GccDPOpt/waveDyMFoam.o: In function `main':
waveDyMFoam.C.text.startup+0x770): undefined reference to `Foam::immiscibleIncompressibleTwoPhaseMixture::im miscibleIncompressibleTwoPhaseMixture(Foam::Geomet ricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&)'
collect2: ld returned 1 exit status
make: *** [/home/ellie/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/waveDyMFoam] Error 1

Sincerely hope you can give me some hints on it.

Thanks!
Ellie
Ellie is offline   Reply With Quote

Old   August 5, 2015, 14:41
Default Wave not develop after relaxazation zone
  #15
New Member
 
Join Date: Aug 2013
Posts: 10
Rep Power: 13
Ellie is on a distinguished road
Since I met the above problem, I went back to look at the "immiscibleIncompressibleTwoPhaseMixture" files, which incorporates the use of 'incompressibleTwoPhaseMixture' and 'interfaceProperties'. So I uncommend the 'twoPhaseProperties.correct();' in waveDyMFoam.C. and fix the related problems. Finally, waveDyMFoam can be compiled, but when I am testing some cases, the wave is apparently not able to develop right after the inlet relaxation zone. I am wondering if anyone who have met this problem before can help settle it.

Thanks in advance!

Ellie
Ellie is offline   Reply With Quote

Old   August 14, 2015, 05:20
Default
  #16
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11
arieljeds is on a distinguished road
Hi everyone,

I'm also trying to follow the instructions here:

https://github.com/OpenFOAM/OpenFOAM...c7396809f308ef

to compile IHFOAM on OF231 but being very new to coding and OpenFOAM I'm a bit unsure about proceeding with all of the changes suggested.

First of all, when looking at the whole file for applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C, this is an extremely stupid question I'm sure, but to modify it I remove the lines that are highlighted in red and add lines that are highlighted in green... is this correct?? I really don't understand the code enough yet to intuitively understand what's needed...

Secondly, I'm finding different instructions when searching and some seem to say to modify files within waveFoam while others are to modify the interFoam file (which is what I'm following at the moment). Which is correct??

thanks in advance for the advice!
arieljeds is offline   Reply With Quote

Old   December 13, 2015, 05:31
Default Help Compiling waves2Foam on OpenFoam 2.3.0
  #17
New Member
 
Join Date: Aug 2011
Posts: 13
Rep Power: 15
insta is on a distinguished road
Dear Users
I need Some help regarding the first steps in waves2Foam library.
I'm having trouble during installion.
I have a few questions:

Is the lack of the GNU scientific library can cause to a compilation problem ? (I have no root privileges)

what to compile first? the modification of interFoam to waveFoam or the ./Allwmake of waves2Foam ?

I have compilation problems in both, but maybe one causes the other.

Any help will be appreciate
insta is offline   Reply With Quote

Old   December 13, 2015, 06:12
Default
  #18
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning,

Yes, if you do not have GNU Scientific Library installed, you will not be able to install waves2Foam. I recommend that you make your own local installation of GSL.

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 offline   Reply With Quote

Old   December 13, 2015, 07:05
Default
  #19
New Member
 
Join Date: Aug 2011
Posts: 13
Rep Power: 15
insta is on a distinguished road
Thx Neils

I will do it

What about the 2nd Question?
do you have an idea

Thx

insta
insta is offline   Reply With Quote

Reply

Tags
openfoam2.3.x, solver compilation error, waves2foam

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
A coupled problem with different equations in different geometries ywem OpenFOAM Programming & Development 3 September 7, 2018 10:30
[waves2Foam] Problem running waves2Foam "waveFlume" tutorial case k.nomi OpenFOAM Community Contributions 6 April 8, 2016 09:56
problem with gradient as source term in coupled equations Cyp OpenFOAM Programming & Development 0 August 16, 2010 13:12
Can I use coupled solver for this problem Frank FLUENT 0 April 11, 2006 06:28
coupled wall problem Gerhard Hinterholzer FLUENT 1 April 13, 2005 12:37


All times are GMT -4. The time now is 03:59.