OpenCFD Ltd. the owner of the OpenFOAM Trademark directly released their version of OpenFOAM from January 2016 to the present day. OpenCFD Ltd is a wholly owned subsidiary of the ESI Group. its versions are identified as v2306,v2212,....
The OpenFOAM Foundation [1], releases versions with numbering identified as v10, v11,...
Here in this blog, we have shared our experience installing OpenFoam v11. On a system named photon running Ubuntu 22.04, we had installed OpenFOAM v11 with the following commands:
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam11
Add the following line to .bashrc to set the path for the openfoam directory
. /opt/openfoam11/etc/bashrc
The openfoam is installed under /etc.
Our Example case directory was in another system named dhruv. We nfs mounted that onto photon by typing
sudo mount -t nfs dhruv:/usr/lib/openfoam/OpenFOAM-v2112/LTTS/YouTube- Tutorials/pho/multiRegionTutorial cloud
(To clarify further, our Open Foam application was installed in photon and our application files were mounted from dhruv)
WORKING_DIRECTORY = /home/sambath/cloud
cd $WORKING_DIRECTORY
You will see constant, system, 0 directories and Allrun & Allclean scripts. Run the scripts.
./Allclean
./Allrun
The ./Allrun script looks as follows
#!/bin/bash
. $WM_PROJECT_DIR/bin/tools/RunFunctions
clear
echo -e "\n Case setup valid for openfoam v5.0"
echo -e "\n Running blockMesh"
runApplication blockMesh
echo -e "Running topoSet"
runApplication topoSet
echo -e "Running splitMesh"
runApplication splitMeshRegions -cellZonesOnly -overwrite
echo -e "Setting up boundary conditions"
runApplication changeDictionary -region Air
rm log.changeDict*
runApplication changeDictionary -region battery1
echo -e "Running solver"
runApplication chtMultiRegionFoam
Postprocessing using paraFoam
I have a high-end GPU on my system(dhruv). I have installed OpenFoam on another system(photon running Ubuntu 22.04) which is a 24 core server(HPC?) but it doesn't have good graphics engine. So I NFS mounted filesystem of photon on dhruv. I ran
paraFoam &
Troubleshooting
Previously, I had completed simulation using the OpenFOAM-v2112[2]. The same initial, boundary conditions in the form of dictionary files, when used with OpenFOAM v11, we encountered many problems. Following are few of them.
(I).
In the OpenFoam Foundation version of openFoam v11 , many dictionary keywords have changed. One of the keywords related error is as follows : error : --> FOAM FATAL IO ERROR: keyword 'sources' is undefined in dictionary "/home/sambath/cloud/multiRegionTutorial/system/battery1/fvOptions/energySource"
(ii).
Solution convergence criteria specified in PIMPLE.residualControl must be given as single values. Corrector loop convergence criteria,
(iii).
FatalErrorInFunction << "Solution convergence criteria specified in " << control_.algorithmName() << '.' << residualDict.dictName() << " must be given as single values. Corrector loop " << "convergence criteria, if appropriate, are specified as " << "dictionaries in " << control_.algorithmName() << ".<loopName>ResidualControl." << exit(FatalError);
(iv).
the Solution convergence criteria specified in PIMPLE.residualControl must be given as single values. what is the solution convergence criteria in the following dictionary residualControl { p_rgh { tolerance 1e-3; relTol 0; } }
(v).
FOAM exiting
--> FOAM FATAL IO ERROR:
Cannot find scheme for laplacian(kappa,T) in dictionary "$FOAM_CASE/system/battery1/fvSchemes/laplacianSchemes"
file: /home/sambath/cloud/multiRegionTutorial/system/battery1/fvSchemes/laplacianSchemes from line 34 to line 35.
From function Foam::ITstream& Foam::fvSchemes::lookupScheme(const Foam::word&, const Foam::dictionary&, const Foam::ITstream&) const
in file finiteVolume/fvSchemes/fvSchemes.C at line 285.
Additional Links
https://www.openfoam.com/news/main-news/openfoam-v2112
留言