CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   immiscibleIncompressibleTwoPhaseMixture (https://www.cfd-online.com/Forums/openfoam-programming-development/187070-immiscibleincompressibletwophasemixture.html)

mgharaati April 27, 2017 15:47

immiscibleIncompressibleTwoPhaseMixture
 
Dear all

I tried to use sclsVOFFoamsf solver but after
Quote:

wmake
I have faced with this error.
Quote:

error: immiscibleIncompressibleTwoPhaseMixture.H: No such file or directory
By opening this path
Quote:

\opt\openfoam-2.3.0\src\transportmodels
I found there isn't any
Quote:

immiscibleIncompressibleTwoPhaseMixture.H
there. would you please help me to fix the problem? Should I reinstall openFOAM again or change the version?

thanks for helping me.

Best,
Masoumeh

spitchers April 27, 2017 15:56

At a first glance... copy the immiscibleIncompressibleTwoPhaseMixture.H into your solver file.

It fixed a recent problem for me. I have no idea why this worked as I'm new to C++. I believe that it is not linked to your library's in the make options file.


Sent from my iPhone using CFD Online Forum mobile app

mgharaati April 28, 2017 10:42

Quote:

Originally Posted by spitchers (Post 646859)
At a first glance... copy the immiscibleIncompressibleTwoPhaseMixture.H into your solver file.

It fixed a recent problem for me. I have no idea why this worked as I'm new to C++. I believe that it is not linked to your library's in the make options file.


Sent from my iPhone using CFD Online Forum mobile app


May I ask you how can I copy this file? I don't have this file at all.

spitchers April 28, 2017 11:01

The file you need is located in : OpenFOAM/src/transportModels


Sent from my iPhone using CFD Online Forum mobile app

mgharaati April 28, 2017 11:09

Quote:

Originally Posted by spitchers (Post 646969)
The file you need is located in : OpenFOAM/src/transportModels


Sent from my iPhone using CFD Online Forum mobile app

U said that I don't have thid file at all. I went to the link but it 's not there.

spitchers April 28, 2017 11:11

Well in that case you need to download it. But it would be there unless you removed it ?


Sent from my iPhone using CFD Online Forum mobile app

mgharaati April 28, 2017 11:12

Quote:

Originally Posted by spitchers (Post 646971)
Well in that case you need to download it. But it would be there unless you removed it ?


Sent from my iPhone using CFD Online Forum mobile app

How can I downlod this? No, I didn't remove that.

spitchers April 29, 2017 04:32

It comes with every OpenFOAM source pack. I would recommend you uninstall OpenFOAM and reinstall it under proper guidelines. If that file is missing, who knows what else is missing. What operating system do you operate from?


Sent from my iPhone using CFD Online Forum mobile app

alexeym April 30, 2017 11:47

Hi all,

@mgharaati

There is no such header in 2.3.0. In the report (http://www.tfd.chalmers.se/~hani/kur...ankarMenon.pdf) it is specifically mentioned, that solver is developed for version 2.3.x.

mgharaati May 2, 2017 12:16

Quote:

Originally Posted by alexeym (Post 647115)
Hi all,

@mgharaati

There is no such header in 2.3.0. In the report (http://www.tfd.chalmers.se/~hani/kur...ankarMenon.pdf) it is specifically mentioned, that solver is developed for version 2.3.x.


Thank you so much. Now, I 'm using OpenFoam4.1.

saatt June 1, 2017 23:09

hi, how do I change the code of sclsVOFFoamsf in of-3.1? There are so many problems when I try to do this! Please give me some suggestions!

alexeym June 2, 2017 03:23

Hi,

@saatt

You start by posting your problems.

Otherwise you have to wait for 1) person you want to build sclsVOFFoamsf, 2) want to build sclsVOFFoamsf using OF-3.1 as an installation environment (also maybe it would be nice if you post version number, which exists), 3) encounters the same problems, 4) want to share with you the way he solved these problems.

1 is probable, 2, 3, and especially 4 is not very likely.

saatt June 2, 2017 21:17

Thank alexeym!
I am so sorry for the question that is too stupid. There are the details of the problem below.
I have changed some codes from of2.3 to of3.0.1. But there also be some debugs. Please tell me how to fix them !!!

/home/y/OpenFOAM/OpenFOAM-3.0.1/src/fvOptions/lnInclude/createFvOptions.H: In function ‘int main(int, char**)’:
/home/y/OpenFOAM/OpenFOAM-3.0.1/src/fvOptions/lnInclude/createFvOptions.H:1:32: error: redeclaration of ‘Foam::fv::IOoptionList fvOptions’
fv::IOoptionList fvOptions(mesh);
^
In file included from sclsVOFFoam.C:70:0:
createFields.H:219:22: error: ‘Foam::fv::IOoptionList fvOptions’ previously declared here
fv::IOoptionList fvOptions(mesh);
^
In file included from sclsVOFFoam.C:73:0:
correctPhi.H:16:9: error: ‘pcorrTypes’ was not declared in this scope
pcorrTypes
^
In file included from sclsVOFFoam.C:143:0:
pEqn.H:15:15: error: ‘class Foam::fv::IOoptionList’ has no member named ‘makeRelative’
fvOptions.makeRelative(phiHbyA);
^
pEqn.H:34:23: error: ‘class Foam::fv::IOoptionList’ has no member named ‘relative’
- fvOptions.relative(mesh.Sf().boundaryField() & U.boundaryField())

alexeym June 3, 2017 03:48

Error messages are rather clear, no?

1. You should not create fvOptions in createFields.H if you include createFvOptions.H.
2. There is no makeRelative in fvOptions any more, so, remove these pieces.
3. Take correctPhi.H from 3.0.1's interFoam.

Since certain errors are specific to the code and

Quote:

I have changed some codes from of2.3 to of3.0.1.
You can either post your code modifications (ideally create public repository with code adapted for 3.0.x), so people can comment directly there; or try to discuss your modifications and original code here.

saatt June 6, 2017 03:15

Hi alexeym!
Thanks for detailed reply.
I have changed the codes according to your suggestions. And the above problems were solved. However, there are some other error messages when I complided the codes(wmake libso). The error messages are in below.
y:~/OpenFOAM/yy-3.0.1/applications/solvers/multiphase/interFoam/sclsVOFFoam$ wmake libso
Making dependency list for source file sclsVOFFoam.C
g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/home/yy/OpenFOAM/OpenFOAM-3.0.1/src/transportModels/twoPhaseMixture/lnInclude -I/home/yy/OpenFOAM/OpenFOAM-3.0.1/src/transportModels -I/home/yy/OpenFOAM/OpenFOAM-3.0.1/src/transportModels/incompressible/lnInclude -I/home/yy/OpenFOAM/OpenFOAM-3.0.1/src/transportModels/interfaceProperties/lnInclude -I/home/yy...(line truncated)...
g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/home/yy/OpenFOAM/OpenFOAM-3.0.1/src/transportModels/twoPhaseMixture/lnInclude -I/home/yy/OpenFOAM/OpenFOAM-3.0.1/src/transportModels -I/home/yy/OpenFOAM/OpenFOAM-3.0.1/src/transportModels/incompressible/lnInclude -I/home/yy/OpenFOAM/OpenFOAM-3.0.1/src/transportModels/interfaceProperties/lnInclude -I/home/yy...(line truncated)...

And this is the address of the code repository (https://github.com/saatt/sclsVOFFoam), please give me some advices one more again!
Thank you very much!!!

alexeym June 6, 2017 03:38

I do not see the error (even in https://raw.githubusercontent.com/sa...rror%20message). Except you are trying to build executable using command "wmake libso" (well, it is not quite an error, your can use any fancy command you like), so instead of executable wmake produced libNULL.so, because it can not find a name of library you are trying to build. What is wrong with just "wmake"?

saatt June 6, 2017 05:26

Yes, it may not be a real error, but I don't understand the message of 'libNULL.so'. Is should the sclsVOFFoam.so when I compiled the code according to the Make/files?

alexeym June 6, 2017 08:18

It should be just sclsVOFFoam.

saatt June 6, 2017 21:16

Thank you for your help!
The codes have complied well when I run wmake.
And I know the different orders of wmake and wmake libso.
Thank you again, alexeym!

https://github.com/saatt/sclsVOFFoam

rasool_soofi September 21, 2020 08:30

Hi all,
I've compiled it on OpenFOAM 2.4.0 and it works.
Rasoul


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