CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

CLSVOF from OF23x to OF231

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2020, 12:29
Default CLSVOF from OF23x to OF231
  #1
Member
 
M Malik
Join Date: Jan 2019
Posts: 47
Rep Power: 3
mmalik is on a distinguished road
Greetings.

So I have been referring this report to understand CLSVOF.

http://www.tfd.chalmers.se/~hani/kur...ankarMenon.pdf

However, I am using OF231 and this solver was created on OF23x.

The solver compiles perfectly with OF23x but when I try to compile with OF231, I am getting an error. I tried looking at all files based on the errors but could not figure out the issue.

Code:
Making dependency list for source file sclsVOFFoam.C
SOURCE=sclsVOFFoam.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam231/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam231/src/transportModels -I/opt/openfoam231/src/transportModels/incompressible/lnInclude -I/opt/openfoam231/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam231/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam231/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude -I/opt/openfoam231/src/finiteVolume/lnInclude -I/opt/openfoam231/src/fvOptions/lnInclude -I/opt/openfoam231/src/meshTools/lnInclude -I/opt/openfoam231/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam231/src/OpenFOAM/lnInclude -I/opt/openfoam231/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linuxGccDPOpt/sclsVOFFoam.o
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcDiv.C:29:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcDiv.H:180,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcDDt.C:27,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcDDt.H:76,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:45,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/divScheme.H: In constructor ‘Foam::fv::divScheme<Type>::divScheme(const Foam::fvMesh&)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/divScheme.H:111:32: error: expected type-specifier before ‘linear’
             tinterpScheme_(new linear<Type>(mesh))
                                ^
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcGrad.C:29:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcGrad.H:124,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:49,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H: In constructor ‘Foam::fv::gaussGrad<Type>::gaussGrad(const Foam::fvMesh&)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H:88:32: error: expected type-specifier before ‘linear’
             tinterpScheme_(new linear<Type>(mesh))
                                ^
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H: In constructor ‘Foam::fv::gaussGrad<Type>::gaussGrad(const Foam::fvMesh&, Foam::Istream&)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H:101:21: error: expected primary-expression before ‘(’ token
                     (
                     ^
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H:102:29: error: expected type-specifier before ‘linear’
                         new linear<Type>(mesh)
                             ^
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.H:150:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/laplacianScheme.H:42,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.C:28,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.H:242,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:53,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C: In member function ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::fv::correctedSnGrad<Type>::fullGradCorrection(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) const’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C:54:9: error: ‘linear’ was not declared in this scope
       & linear<typename outerProduct<vector, Type>::type>(mesh).interpolate
         ^
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C:54:9: note: suggested alternative:
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcAverage.C:29:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcAverage.H:91,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:42,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/linear.H:52:7: note:   ‘Foam::compressibilityModels::linear’
 class linear
       ^
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.H:150:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/laplacianScheme.H:42,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.C:28,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.H:242,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:53,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C:54:57: error: expected ‘(’ before ‘>’ token
       & linear<typename outerProduct<vector, Type>::type>(mesh).interpolate
                                                         ^
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C:54:65: error: ‘const class Foam::fvMesh’ has no member named ‘interpolate’
       & linear<typename outerProduct<vector, Type>::type>(mesh).interpolate
                                                                 ^
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.C:28:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.H:242,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:53,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/laplacianScheme.H: In constructor ‘Foam::fv::laplacianScheme<Type, GType>::laplacianScheme(const Foam::fvMesh&)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/laplacianScheme.H:113:37: error: expected type-specifier before ‘linear’
             tinterpGammaScheme_(new linear<GType>(mesh)),
                                     ^
In file included from createFields.H:105:0,
                 from sclsVOFFoam.C:66:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/createPhi.H: In function ‘int main(int, char**)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/createPhi.H:49:24: error: ‘linearInterpolate’ was not declared in this scope
     linearInterpolate(U) & mesh.Sf()
                        ^
In file included from sclsVOFFoam.C:66:0:
createFields.H:162:13: error: ‘incompressible’ was not declared in this scope
     autoPtr<incompressible::turbulenceModel> turbulence
             ^
createFields.H:162:44: error: template argument 1 is invalid
     autoPtr<incompressible::turbulenceModel> turbulence
                                            ^
createFields.H:163:5: error: invalid type in declaration before ‘(’ token
     (
     ^
createFields.H:164:9: error: ‘incompressible’ is not a class or namespace
         incompressible::turbulenceModel::New(U, phi, mixture)
         ^
In file included from sclsVOFFoam.C:70:0:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/CourantNo.H:51:1: error: ‘namespace’ definition is not allowed here
 namespace Foam
 ^
In file included from sclsVOFFoam.C:71:0:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/setInitialDeltaT.H:35:40: error: ‘CoNum’ was not declared in this scope
     if ((runTime.timeIndex() == 0) && (CoNum > SMALL))
                                        ^
In file included from sclsVOFFoam.C:99:0:
setDeltaT.H:37:20: error: ‘CoNum’ was not declared in this scope
         min(maxCo/(CoNum + SMALL), maxAlphaCo/(alphaCoNum + SMALL));
                    ^
In file included from sclsVOFFoam.C:121:0:
UEqn.H:5:19: error: base operand of ‘->’ is not a pointer
       + turbulence->divDevRhoReff(rho, U)
                   ^
sclsVOFFoam.C:131:18: error: base operand of ‘->’ is not a pointer
        turbulence->correct();
                  ^
In file included from sclsVOFFoam.C:67:0:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
 scalar maxDeltaT =
        ^
make: *** [Make/linuxGccDPOpt/sclsVOFFoam.o] Error 1
Any hints??
mmalik is online now   Reply With Quote

Old   May 20, 2020, 13:36
Default
  #2
Member
 
Hasan Celik
Join Date: Sep 2016
Posts: 43
Rep Power: 5
PositronCascade is on a distinguished road
There might be a change in fvCFD.H file between two versions and that might be causing error due to change of some definitions, constructors etc.

Quote:
Originally Posted by mmalik View Post
Greetings.

So I have been referring this report to understand CLSVOF.

http://www.tfd.chalmers.se/~hani/kur...ankarMenon.pdf

However, I am using OF231 and this solver was created on OF23x.

The solver compiles perfectly with OF23x but when I try to compile with OF231, I am getting an error. I tried looking at all files based on the errors but could not figure out the issue.

Code:
Making dependency list for source file sclsVOFFoam.C
SOURCE=sclsVOFFoam.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam231/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam231/src/transportModels -I/opt/openfoam231/src/transportModels/incompressible/lnInclude -I/opt/openfoam231/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam231/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam231/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude -I/opt/openfoam231/src/finiteVolume/lnInclude -I/opt/openfoam231/src/fvOptions/lnInclude -I/opt/openfoam231/src/meshTools/lnInclude -I/opt/openfoam231/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam231/src/OpenFOAM/lnInclude -I/opt/openfoam231/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linuxGccDPOpt/sclsVOFFoam.o
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcDiv.C:29:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcDiv.H:180,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcDDt.C:27,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcDDt.H:76,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:45,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/divScheme.H: In constructor ‘Foam::fv::divScheme<Type>::divScheme(const Foam::fvMesh&)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/divScheme.H:111:32: error: expected type-specifier before ‘linear’
             tinterpScheme_(new linear<Type>(mesh))
                                ^
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcGrad.C:29:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcGrad.H:124,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:49,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H: In constructor ‘Foam::fv::gaussGrad<Type>::gaussGrad(const Foam::fvMesh&)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H:88:32: error: expected type-specifier before ‘linear’
             tinterpScheme_(new linear<Type>(mesh))
                                ^
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H: In constructor ‘Foam::fv::gaussGrad<Type>::gaussGrad(const Foam::fvMesh&, Foam::Istream&)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H:101:21: error: expected primary-expression before ‘(’ token
                     (
                     ^
/opt/openfoam231/src/transportModels/incompressible/lnInclude/gaussGrad.H:102:29: error: expected type-specifier before ‘linear’
                         new linear<Type>(mesh)
                             ^
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.H:150:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/laplacianScheme.H:42,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.C:28,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.H:242,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:53,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C: In member function ‘Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::fv::correctedSnGrad<Type>::fullGradCorrection(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) const’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C:54:9: error: ‘linear’ was not declared in this scope
       & linear<typename outerProduct<vector, Type>::type>(mesh).interpolate
         ^
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C:54:9: note: suggested alternative:
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcAverage.C:29:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcAverage.H:91,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:42,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/linear.H:52:7: note:   ‘Foam::compressibilityModels::linear’
 class linear
       ^
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.H:150:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/laplacianScheme.H:42,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.C:28,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.H:242,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:53,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C:54:57: error: expected ‘(’ before ‘>’ token
       & linear<typename outerProduct<vector, Type>::type>(mesh).interpolate
                                                         ^
/opt/openfoam231/src/transportModels/incompressible/lnInclude/correctedSnGrad.C:54:65: error: ‘const class Foam::fvMesh’ has no member named ‘interpolate’
       & linear<typename outerProduct<vector, Type>::type>(mesh).interpolate
                                                                 ^
In file included from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.C:28:0,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvcLaplacian.H:242,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvc.H:53,
                 from /opt/openfoam231/src/transportModels/incompressible/lnInclude/fvCFD.H:8,
                 from sclsVOFFoam.C:40:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/laplacianScheme.H: In constructor ‘Foam::fv::laplacianScheme<Type, GType>::laplacianScheme(const Foam::fvMesh&)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/laplacianScheme.H:113:37: error: expected type-specifier before ‘linear’
             tinterpGammaScheme_(new linear<GType>(mesh)),
                                     ^
In file included from createFields.H:105:0,
                 from sclsVOFFoam.C:66:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/createPhi.H: In function ‘int main(int, char**)’:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/createPhi.H:49:24: error: ‘linearInterpolate’ was not declared in this scope
     linearInterpolate(U) & mesh.Sf()
                        ^
In file included from sclsVOFFoam.C:66:0:
createFields.H:162:13: error: ‘incompressible’ was not declared in this scope
     autoPtr<incompressible::turbulenceModel> turbulence
             ^
createFields.H:162:44: error: template argument 1 is invalid
     autoPtr<incompressible::turbulenceModel> turbulence
                                            ^
createFields.H:163:5: error: invalid type in declaration before ‘(’ token
     (
     ^
createFields.H:164:9: error: ‘incompressible’ is not a class or namespace
         incompressible::turbulenceModel::New(U, phi, mixture)
         ^
In file included from sclsVOFFoam.C:70:0:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/CourantNo.H:51:1: error: ‘namespace’ definition is not allowed here
 namespace Foam
 ^
In file included from sclsVOFFoam.C:71:0:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/setInitialDeltaT.H:35:40: error: ‘CoNum’ was not declared in this scope
     if ((runTime.timeIndex() == 0) && (CoNum > SMALL))
                                        ^
In file included from sclsVOFFoam.C:99:0:
setDeltaT.H:37:20: error: ‘CoNum’ was not declared in this scope
         min(maxCo/(CoNum + SMALL), maxAlphaCo/(alphaCoNum + SMALL));
                    ^
In file included from sclsVOFFoam.C:121:0:
UEqn.H:5:19: error: base operand of ‘->’ is not a pointer
       + turbulence->divDevRhoReff(rho, U)
                   ^
sclsVOFFoam.C:131:18: error: base operand of ‘->’ is not a pointer
        turbulence->correct();
                  ^
In file included from sclsVOFFoam.C:67:0:
/opt/openfoam231/src/transportModels/incompressible/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
 scalar maxDeltaT =
        ^
make: *** [Make/linuxGccDPOpt/sclsVOFFoam.o] Error 1
Any hints??
PositronCascade is online now   Reply With Quote

Old   May 20, 2020, 13:45
Default
  #3
Member
 
M Malik
Join Date: Jan 2019
Posts: 47
Rep Power: 3
mmalik is on a distinguished road
Quote:
Originally Posted by PositronCascade View Post
There might be a change in fvCFD.H file between two versions and that might be causing error due to change of some definitions, constructors etc.
Thank you for the quick response. I had a look at both fvCFD.H versions and they are identical.
mmalik is online now   Reply With Quote

Reply

Tags
clsvof, clsvoffoamsf

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
CLSVOF - for capillary rise kuria OpenFOAM Verification & Validation 0 March 28, 2019 06:39
Initialization of the LS function, CLSVOF in Fluent Sufyan FLUENT 0 August 1, 2018 04:53
CLSVOF in InterFoam kalaikdr OpenFOAM Running, Solving & CFD 26 June 19, 2018 00:42
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker rt08 OpenFOAM Installation 1 February 28, 2016 19:00
CLSVOF on star-ccm+ tayo STAR-CCM+ 5 September 18, 2012 06:42


All times are GMT -4. The time now is 08:35.