CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [waves2Foam] Problem with waves2Foam coupled with OpenFOAM2.3.x (https://www.cfd-online.com/Forums/openfoam-community-contributions/136412-problem-waves2foam-coupled-openfoam2-3-x.html)

Michele Righi May 28, 2014 06:37

Problem with waves2Foam coupled with OpenFOAM2.3.x
 
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

ngj May 31, 2014 12:22

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

Michele Righi June 1, 2014 10:24

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

ngj June 1, 2014 11:11

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

CFD-Palma February 9, 2015 13:29

Quote:

Originally Posted by Michele Righi (Post 495067)
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

wyldckat February 15, 2015 07:39

Quick answer: See commit 3c837948f19c4 in 2.3.x and you'll see what needs changing: https://github.com/OpenFOAM/OpenFOAM...c7396809f308ef

JGadelho February 25, 2015 09:02

Quote:

Originally Posted by wyldckat (Post 531912)
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!

CFD-Palma March 1, 2015 13:20

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 March 4, 2015 06:21

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

mmbeik April 30, 2015 04:13

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

wyldckat April 30, 2015 11:25

Quote:

Originally Posted by mmbeik (Post 544423)
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

hchen June 10, 2015 11:45

Hi Carlos,

Could you attach your modified wavesDyMFoam.C file?

Best regards
Hao

Quote:

Originally Posted by CFD-Palma (Post 533884)
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 June 15, 2015 11:09

waveDymFoam with OF 231
 
2 Attachment(s)
Pls find attached the modified WDF.
Also added createFields.h with the mentioned modification.

Hoppe it helps :)
Carlos.

Ellie August 5, 2015 10:40

Quote:

Originally Posted by CFD-Palma (Post 550427)
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 August 5, 2015 14:41

Wave not develop after relaxazation zone
 
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

arieljeds August 14, 2015 05:20

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!

insta December 13, 2015 05:31

Help Compiling waves2Foam on OpenFoam 2.3.0
 
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

ngj December 13, 2015 06:12

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

insta December 13, 2015 07:05

Thx Neils

I will do it

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

Thx

insta


All times are GMT -4. The time now is 07:49.