CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   wave2foam dictionary waveProperties objectRegistry request failed (http://www.cfd-online.com/Forums/openfoam-solving/114676-wave2foam-dictionary-waveproperties-objectregistry-request-failed.html)

sophie_l March 15, 2013 07:18

wave2foam dictionary waveProperties objectRegistry request failed
 
Hi,

I am running interFoam with wave2foam. The mesh, setFields, setWaveField stuff and etc are fine, however, when I type $ interFoam in the terminal, fatal error occurs.

--> FOAM FATAL ERROR:

request for dictionary waveProperties from objectRegistry region0 failed
available objects of type dictionary are

2
(
fvSchemes
fvSolution
)


From function objectRegistry::lookupObject<Type>(const word&) const
in file /opt/openfoam171/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 139.

FOAM aborting

I've included the wave2foam library in the controlDict (libs ( "libwaves2Foam.so" ) ), and the 'waveProperties' is placed in the 'constant' directory. Could you help indicate what I should do please?

Thanks a lot in advance!

ngj March 15, 2013 08:40

Hi Sophie,

This is not possible. You need to use waveFoam instead of interFoam.

/ Niels

sophie_l March 15, 2013 09:19

Hi Niels,

Thanks a lot! I am using openfoam 1.7.1. I thought I've installed wave2foam without error messages. However, the solver waveFoam cannot be found. So I tried to compile waveFoam from
/OpenFOAM/waves2Foam/applications/solvers/solvers170/waveFoam, using 'wmake', and the following errors occured.
Quote:

Making dependency list for source file waveFoam.C
SOURCE=waveFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/transportModels -I/opt/openfoam171/src/transportModels/incompressible/lnInclude -I/opt/openfoam171/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam171/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam171/src/finiteVolume/lnInclude -DOFVERSION=170 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/waveFoam.o
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:3:9: warning: unused variable ‘nCorr’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:8:10: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/transportModels -I/opt/openfoam171/src/transportModels/incompressible/lnInclude -I/opt/openfoam171/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam171/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam171/src/finiteVolume/lnInclude -DOFVERSION=170 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linuxGccDPOpt/waveFoam.o -L/opt/openfoam171/lib/linuxGccDPOpt \
-linterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -L/home/yaru/OpenFOAM/yaru-1.7.1/lib/linuxGccDPOpt -lwaves2Foam -lOpenFOAM -liberty -ldl -lm -o /home/yaru/OpenFOAM/yaru-1.7.1/applications/bin/linuxGccDPOpt/waveFoam
/opt/openfoam171/lib/linuxGccDPOpt/libinterfaceProperties.so: undefined reference to `typeinfo for Foam::alphaContactAngleFvPatchScalarField'
collect2: ld returned 1 exit status
Could you give some suggestions please?

Thank you very much!

Sophie

ngj March 15, 2013 09:41

Hi Sophie,

It is because there are subtle differences between the versions. Please follow the guide on http://openfoamwiki.net/index.php/Contrib/waves2Foam, which in detail describes the needed modifications in order to obtain waveFoam from interFoam.

However, how come you have settled on OF171? More recent version exist, and waves2Foam compiles on all of them (though, no solver is distributed along with OF2.2.0 as of now).

Kind regards,

Niels

sophie_l March 15, 2013 11:09

Hi Niels,

Thank you so much for your patience with a linux dummy. I've modified waveFoam.C from interFoam (v1.7.1) as instructed by the website in your post. When I try to compile it, the 'undefined reference' stuff occur again. I saw some posts mentioning the same problem, but didn't work out how to fix it. Just wondering could you shed some light on this please?

Quote:

Making dependency list for source file waveFoam.C
SOURCE=waveFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/transportModels -I/opt/openfoam171/src/transportModels/incompressible/lnInclude -I/opt/openfoam171/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam171/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam171/src/finiteVolume/lnInclude -DOFVERSION=171 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/waveFoam.o
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:3:9: warning: unused variable ‘nCorr’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:8:10: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’ [-Wunused-variable]
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/transportModels -I/opt/openfoam171/src/transportModels/incompressible/lnInclude -I/opt/openfoam171/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam171/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam171/src/finiteVolume/lnInclude -DOFVERSION=171 -I./../../../../src/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linuxGccDPOpt/waveFoam.o -L/opt/openfoam171/lib/linuxGccDPOpt \
-ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -L/home/yaru/OpenFOAM/yaru-1.7.1/lib/linuxGccDPOpt -lwaves2Foam -lOpenFOAM -liberty -ldl -lm -o /home/yaru/OpenFOAM/yaru-1.7.1/applications/bin/linuxGccDPOpt/waveFoam
Make/linuxGccDPOpt/waveFoam.o: In function `main':
waveFoam.C:(.text.startup+0xe3a): undefined reference to `Foam::interfaceProperties::interfaceProperties(Fo am::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::IOdictionary const&)'
waveFoam.C:(.text.startup+0x3a9e): undefined reference to `Foam::interfaceProperties::calculateK()'
collect2: ld returned 1 exit status
Many thanks

Sophie

ngj March 17, 2013 07:05

Hi Sophie,

Sorry for the latency.

I have seen this type of error many times, however, but only if I use a version of interFoam, which is not compatible with the version of OpenFoam. Now, that you have used interFoam from 171, it hardly makes sense.

The only way forward (at least when sticking to 1.7.1) is to try, whether you are able to compile interFoam without any modifications at all. If that is possible, you can try to add the waves2Foam functionalities one at the time.

Kind regards,

Niels

sophie_l March 17, 2013 20:43

Hi Niels,

Thank you so much for your guidance. Luckily my supervisor helped me with the compilation and it's done now. However, I can only run waveFoam with laminar mode, and cannot run it with RASModel, the error message is
Quote:

--> FOAM FATAL ERROR:
Unknown turbulenceModel type RASModel

Valid turbulenceModel types are :

1
(
laminar
)


From function turbulenceModel::New(const volVectorField&, const surfaceScalarField&, transportModel&)
in file turbulenceModel.C at line 101.

FOAM exiting
I saw some threads having the same problem, which was mainly due to the update of their operating system. However, I didn't update the operating system on my pc. Just wondering what would be the cause.

Thanks!
Sophie

ngj March 18, 2013 02:39

Hi Sophie,

It looks like an upstream error. interFoam/waveFoam should automatically detect your choice of turbulence model, i.e. laminar, reynolds averaged, LES.

You have to be more specific in what you change where, otherwise I can only be guessing on what goes wrong.

/ Niels

sophie_l March 19, 2013 09:14

Hi Niels,

Thanks a lot for your reply. I copied the interFoam folder and renamed it as solver171. A waveFoam.C was modified as instructed by the wave2foam wiki page. Then I changed the 'Make/options' file as follows
Quote:

EXE_INC = \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-DOFVERSION=171 \
-I./../../../../src/lnInclude

EXE_LIBS = \
-linterfaceProperties \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume \
-L$(FOAM_USER_LIBBIN) \
-lwaves2Foam
After compilation, laminar cases can be run but when using RASModel, the aforementioned error occurs.

I didn't change anywhere else, so I am thinking the 'options' file should give out some clue.

Many thanks,
Sophie

ngj March 19, 2013 10:14

Can you run your standard interFoam tutorials with anything but laminar? If this is possible, then I really do not understand the problems.

Kind regards,

NIels

sophie_l March 19, 2013 11:59

I've run the tutorial case ras/dambreak with interFoam and everything is ok! Another strange thing is that the error message occurred again when I tried to set up the alpha1 value for the waveFoam case. When I type 'setFields' in the terminal, it says
Quote:

Reading setFieldsDict

Setting field default values
Setting volScalarField alpha1


--> FOAM FATAL ERROR:

request for dictionary waveProperties from objectRegistry region0 failed
available objects of type dictionary are

3
(
fvSchemes
fvSolution
setFieldsDict
)
totally lost now...Just wondering could you get a clue from this.

Many thanks,
Sophie

ngj March 19, 2013 12:08

Hi Sophie,

I recommend that you use setWaveField as setFields does not load waveProperties, which is needed by the boundary conditions in alpha1.

Kind regards,

Niels


All times are GMT -4. The time now is 11:24.