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

OpenFOAM 10 - multiphaseEulerFoam compilation error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2023, 04:14
Default OpenFOAM 10 - multiphaseEulerFoam compilation error
  #1
New Member
 
Anonymous
Join Date: Mar 2018
Posts: 6
Rep Power: 8
palmera2 is on a distinguished road
Dear All,

I'm trying to compile the multiphaseEulerFoam of OpenFOAM 10 using the WSL utility without success. I have tried to copy the solver from source and compile it using the Allwmake script.

I have used the following commands:

Code:
 2008  cp -r $FOAM_APP/solvers/multiphase/multiphaseEulerFoam . 1>log.copy_solver 2>err.copy_solver
 2011  cd multiphaseEulerFoam/
 2013  ./Allwclean 1>log.Allwclean 2>err.Allwclean
 2015  ./Allwmake 1>log.Allwmake 2>err.Allwmake
 2016  history
I got the errors while compiling the phaseModel.c file because it couldn't find class Function1 (mind the capital F). A sample of the errors can be seen below:

Code:
wmakeLnInclude: linking include files to ../interfacialModels//lnInclude
wmakeLnInclude: linking include files to ../interfacialCompositionModels//lnInclude
wmakeLnInclude: linking include files to ../multiphaseCompressibleMomentumTransportModels//lnInclude
wmakeLnInclude: linking include files to ./lnInclude
In file included from /home/user/OpenFOAM/OpenFOAM-10/src/finiteVolume/lnInclude/MRFZone.H:51,
                 from /home/user/OpenFOAM/OpenFOAM-10/src/finiteVolume/lnInclude/MRFZoneList.H:41,
                 from /home/user/OpenFOAM/OpenFOAM-10/src/finiteVolume/lnInclude/IOMRFZoneList.H:54,
                 from lnInclude/phaseSystem.H:48,
                 from phaseModel/phaseModel/phaseModel.C:27:
../interfacialCompositionModels/lnInclude/Function1.H:99:17: error: ‘Function1’ was not declared in this scope; did you mean ‘function1’?
   99 |         autoPtr<Function1<scalar>> function_;
      |                 ^~~~~~~~~
      |                 function1
...
In addition, I had other errors related to a certain field Omega:

Code:
/home/user/OpenFOAM/OpenFOAM-10/src/finiteVolume/lnInclude/MRFZoneTemplates.C: In member function ‘void Foam::MRFZone::makeRelativeRhoFlux(const RhoFieldType&, Foam::surfaceScalarField&) const’:
/home/user/OpenFOAM/OpenFOAM-10/src/finiteVolume/lnInclude/MRFZoneTemplates.C:44:26: error: ‘omega_’ was not declared in this scope; did you mean ‘Omega’?
   44 |     const vector Omega = omega_->value(mesh_.time().userTimeValue())*axis_;
      |                          ^~~~~~
      |                          Omega
...
Make/linux64GccDPInt32Opt/phaseModel/phaseModel/phaseModel.o] Error 1
Regarding the first group of errors, the class Function1 seems to be defined in a header file but I couldn't track it down.

Code:
#ifndef function1_H
#define function1_H

#include "saturationModel.H"
#include "Function1.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{
namespace saturationModels
{

/*---------------------------------------------------------------------------*\
                          Class function1 Declaration
\*---------------------------------------------------------------------------*/

class function1
:
    public saturationModel
{
    // Private Data

        //- Saturation temperature as a function of pressure
        autoPtr<Function1<scalar>> function_;


public:

    //- Runtime type information
    TypeName("function1");
Could it be that I'm missing some dependencies for compiling the multiphaseEulerFoam solver?

I apologize in advance, as this is likely a basic mistake of mine in the compilation. The precompiled version of the solver works just fine.

Thanks in advance!
palmera2 is offline   Reply With Quote

Old   February 16, 2023, 09:24
Default
  #2
New Member
 
Anonymous
Join Date: Mar 2018
Posts: 6
Rep Power: 8
palmera2 is on a distinguished road
Just as an update, the solver compiles fine if I'm using a Linux machine. Therefore, it could be a problem with copying files using the WSL virtual machine on Windows.
palmera2 is offline   Reply With Quote

Reply


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
[swak4Foam] swak4foam openfoam 7 installation problem Andrea23 OpenFOAM Community Contributions 1 February 17, 2020 19:11
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 07:35
Errors in UDF shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 21:30
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


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