|
[Sponsors] |
Problem while compiling a turbulence model in OF 4.1 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 11, 2018, 10:38 |
Problem while compiling a turbulence model in OF 4.1
|
#1 | |||
Member
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 52
Rep Power: 11 |
Hi everybody,
I am having some problems compiling a modified k-epsilon turbulence model in OpenFoam 4.1 To be sure I'm not writing anything wrong in the files, I have copied the original files of the model and I have changed all of the "kEpsilon" terms for "mykEpsilon" and nothing else. My Make/files has the following: Quote:
Quote:
Quote:
Thank you very much!! Alex |
||||
May 14, 2018, 00:13 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 14 |
I've been able to compile my own turbulence models by creating the necessary .H and .C files. Then using an (eg) makeTurbulenceModel.C to create the new library. I've included example code for a new les model in 4.x -- it will hopefully work for you in 4.1. I've found that I get warnings at run time about various duplicates, but the new model works (once the new library is included in the control dict). I believe I originally pulled code to do this from here : http://hassankassem.me/posts/newturbulencemodel/.
Code:
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ #include "CompressibleTurbulenceModel.H" #include "compressibleTransportModel.H" #include "fluidThermo.H" #include "addToRunTimeSelectionTable.H" #include "makeTurbulenceModel.H" #include "ThermalDiffusivity.H" #include "EddyDiffusivity.H" #include "laminar.H" #include "RASModel.H" #include "LESModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makeBaseTurbulenceModel ( geometricOneField, volScalarField, compressibleTurbulenceModel, CompressibleTurbulenceModel, ThermalDiffusivity, fluidThermo ); #define makeLESModel(Type) \ makeTemplatedTurbulenceModel \ (fluidThermoCompressibleTurbulenceModel, LES, Type) // -------------------------------------------------------------------------- // // LES models // -------------------------------------------------------------------------- // #include "customModel.H" makeLESModel(customModel); // ************************************************************************* // |
|
May 14, 2018, 12:26 |
|
#3 |
Member
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 52
Rep Power: 11 |
Thank you very much!!!
When I first read that post you referenced I didn't understand it, but now thanks to you and reading it calmly, I could be able to compile my model. I had to do some minor changes, though, because I haven't copied the entire turbulence library, so I had to change some of the directions of the includes, but the important thing is that it works Thanks again |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
about choosing Turbulence model for multiphase flow problem. | Near | FLUENT | 5 | April 11, 2019 04:24 |
Help Selecting Turbulence Model for VOF Problem | NavierIsStoked | FLUENT | 0 | November 1, 2013 11:27 |
K - epsilon VS SST turbulence model | Maicol | Main CFD Forum | 0 | November 30, 2012 16:25 |
problem compiling spalart allmaras model | bababanamzdaalma | OpenFOAM | 0 | April 4, 2012 20:13 |
Centrifugal Pump and Turbulence Model | Michiel | CFX | 12 | January 25, 2010 03:20 |