|
[Sponsors] |
[OpenFOAM.com] Add/Install new solver in Openfoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 12, 2023, 17:52 |
Add/Install new solver in Openfoam
|
#1 |
New Member
Join Date: Nov 2023
Posts: 9
Rep Power: 3 |
Hello everyone,
I am trying to add a new solver to Openfoam 11. I am using Ubuntu 20.04.6 LTS on my Windows PC. The solver I am trying to add is ShallowFoam (https://github.com/mintgen/shallowFoam). It was developed for Openfoam 3.xx version. I tried downgrading to Openfoam 4.0 and 4.1 (there was ShallowFoam versions for openfoam 4.xx as well), but the installation didnt work unfortunetly, because of a know (registered) bug. I expect the same from Openfoam 3.xx. Back to Openfoam 11: I used the following commands from this guide: https://openfoamwiki.net/index.php/H...ure_to_icoFoam When I try to run wmake I get the following errors in the ubuntu terminal: Code:
wmake Making dependency list for source file fixedAbsoluteWaterLevelFvPatchScalarField.C Making dependency list for source file timeVaryingFlowRateInletFvPatchVectorField.C could not open file interpolationTable.H for source file derivedFvPatchFields/timeVaryingFlowRateInlet/timeVaryingFlowRateInletFvPatchVectorField.C due to No such file or directory Making dependency list for source file flowRateInletFvPatchVectorField.C Making dependency list for source file dischargeFlowDepthOutletFvPatchVectorField.C Making dependency list for source file energyHeadInletFvPatchVectorField.C Making dependency list for source file criticalFlowDepthInletFvPatchScalarField.C Making dependency list for source file shallowFoam.C g++ -std=c++14 -m64 -DLIB_NAME=libNULL.so -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 -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam11/src/finiteVolume/lnInclude -I/opt/openfoam11/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam11/src/OpenFOAM/lnInclude -I/opt/openfoam11/src/OSspecific/POSIX/lnInclude -fPIC -c shallowFoam.C -o Make/linux64GccDPInt32Opt/shallowFoam.o In file included from shallowFoam.C:50: /opt/openfoam11/src/finiteVolume/lnInclude/readTimeControls.H: In function ‘int main(int, char**)’: /opt/openfoam11/src/finiteVolume/lnInclude/readTimeControls.H:32:1: error: ‘adjustTimeStep’ was not declared in this scope 32 | adjustTimeStep = | ^~~~~~~~~~~~~~ /opt/openfoam11/src/finiteVolume/lnInclude/readTimeControls.H:35:1: error: ‘maxCo’ was not declared in this scope 35 | maxCo = | ^~~~~ /opt/openfoam11/src/finiteVolume/lnInclude/readTimeControls.H:38:1: error: ‘maxDeltaT’ was not declared in this scope 38 | maxDeltaT = | ^~~~~~~~~ In file included from shallowFoam.C:60: /opt/openfoam11/src/finiteVolume/lnInclude/setDeltaT.H:43:30: error: ‘fvModels’ was not declared in this scope 43 | deltaT = min(min(deltaT, fvModels.maxDeltaT()), maxDeltaT); | ^~~~~~~~ In file included from shallowFoam.C:88: zeroGradientWetDry.H:33:7: error: ‘unallocLabelList’ does not name a type 33 | const unallocLabelList& owner = mesh.owner(); | ^~~~~~~~~~~~~~~~ zeroGradientWetDry.H:34:7: error: ‘unallocLabelList’ does not name a type 34 | const unallocLabelList& neighbour = mesh.neighbour(); | ^~~~~~~~~~~~~~~~ zeroGradientWetDry.H:40:50: error: binding reference of type ‘Foam::vectorField&’ {aka ‘Foam::Field<Foam::Vector<double> >&’} to ‘const Foam::Field<Foam::Vector<double> >’ discards qualifiers 40 | vectorField& gradgSpHfi = gradgSpHf.internalField(); | ~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from /opt/openfoam11/src/OpenFOAM/lnInclude/List.H:43, from /opt/openfoam11/src/OpenFOAM/lnInclude/labelList.H:48, from /opt/openfoam11/src/OpenFOAM/lnInclude/UPstream.H:42, from /opt/openfoam11/src/OpenFOAM/lnInclude/Pstream.H:42, from /opt/openfoam11/src/OpenFOAM/lnInclude/parRun.H:35, from /opt/openfoam11/src/OSspecific/POSIX/lnInclude/fvCFD.H:4, from shallowFoam.C:37: zeroGradientWetDry.H:42:8: error: ‘owner’ was not declared in this scope 42 | forAll(owner, facei) | ^~~~~ /opt/openfoam11/src/OpenFOAM/lnInclude/UList.H:436:30: note: in definition of macro ‘forAll’ 436 | for (Foam::label i=0; i<(list).size(); i++) | ^~~~ In file included from shallowFoam.C:88: zeroGradientWetDry.H:45:13: error: ‘neighbour’ was not declared in this scope 45 | label N = neighbour[facei]; | ^~~~~~~~~ make: *** [/opt/openfoam11/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/shallowFoam.o] Error 1 Thank you very much!!! |
|
December 13, 2023, 12:32 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Lots of name changes but unallocLabelList is now written as labelUList.
|
|
Tags |
openfoam 11, solver compilation, solver compilation error, solver development, solver installation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
OpenFOAM webinar: A multidimensional parallel numerical solver of ADM1 model for anae | Gavin | OpenFOAM Announcements from Other Sources | 0 | July 12, 2018 11:30 |
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin | CFDFoundation | OpenFOAM Announcements from Other Sources | 0 | January 4, 2017 07:15 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |
OpenCL linear solver for OpenFoam 1.7 (alpha) will come out very soon | qinmaple | OpenFOAM Announcements from Other Sources | 4 | August 10, 2012 12:00 |