|
[Sponsors] |
June 27, 2012, 05:07 |
Source in k-equation
|
#1 |
New Member
Join Date: Feb 2012
Posts: 4
Rep Power: 14 |
Dear all,
I want to include a temperature dependent source term in the k-equation of the kOmegaSST turbulence model. There is a tutorial how to copy and compile the keps model and I was able to do the mentioned steps for the kOmegaSST model too. It works. Now the modification of the k-equation has to be performed. I tried to access field values of T via const volScalarField& T = mesh().objectRegistry::lookupObject<volScalarField >("T"); but I got the error that "mesh" was not declared in this scope. I really read a lot about accessing field values but was not able to succeed. Furthermore I am not shure where exactly I have to add this few commands (e.g. right before k-equation or somewhere else...). I am quite new to OF and my knowledge about C++ is very bad. Best regards! |
|
July 2, 2012, 07:33 |
|
#2 |
New Member
Andreas Herwig
Join Date: Jan 2011
Posts: 6
Rep Power: 15 |
please have a look here
http://www.cfd-online.com/Forums/ope...t-2-1-1-a.html You need something like Code:
const volScalarField& T_ = U_.db().lookupObject<volScalarField>(TName_); greetings andreas |
|
July 2, 2012, 10:23 |
|
#3 |
New Member
Join Date: Feb 2012
Posts: 4
Rep Power: 14 |
Thx a lot - the compiler showed no error and the solver runs with reasonable results in serial mode. But I face a problem in parallel computing. When executing "decomposePar" I receive following error message:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.1.0-0bc225064152 Exec : decomposePar Date : Jul 02 2012 Time : 15:01:40 Host : "paalj-openfoam" PID : 3811 Case : /home/paalj/OpenFOAM/paalj-2.1.0/run/cavity nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1175 dlopen error : /home/paalj/OpenFOAM/paalj-2.1.0/platforms/linuxGccDPOpt/lib/libccRASModel.so: undefined symbol: _ZN4Foam14incompressible8RASModel11printCoeffsEv --> FOAM Warning : From function dlLibraryTable:pen(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "libccRASModel.so" Time = 0 Create mesh Calculating distribution of cells Selecting decompositionMethod simple Finished decomposition in 0.07 s Calculating original mesh data Distributing cells to processors Distributing faces to processors Distributing points to processors Constructing processor meshes --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1175 dlopen error : /home/paalj/OpenFOAM/paalj-2.1.0/platforms/linuxGccDPOpt/lib/libccRASModel.so: undefined symbol: _ZN4Foam14incompressible8RASModel11printCoeffsEv --> FOAM Warning : From function dlLibraryTable:pen(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "libccRASModel.so" Processor 0 Number of cells = 3335 Number of faces shared with processor 1 = 44 Number of processor patches = 1 Number of processor faces = 44 Number of boundary faces = 6934 --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1175 dlopen error : /home/paalj/OpenFOAM/paalj-2.1.0/platforms/linuxGccDPOpt/lib/libccRASModel.so: undefined symbol: _ZN4Foam14incompressible8RASModel11printCoeffsEv --> FOAM Warning : From function dlLibraryTable:pen(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "libccRASModel.so" Processor 1 Number of cells = 3334 Number of faces shared with processor 0 = 44 Number of faces shared with processor 2 = 44 Number of processor patches = 2 Number of processor faces = 88 Number of boundary faces = 6824 --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1175 dlopen error : /home/paalj/OpenFOAM/paalj-2.1.0/platforms/linuxGccDPOpt/lib/libccRASModel.so: undefined symbol: _ZN4Foam14incompressible8RASModel11printCoeffsEv --> FOAM Warning : From function dlLibraryTable:pen(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "libccRASModel.so" Processor 2 Number of cells = 3334 Number of faces shared with processor 1 = 44 Number of processor patches = 1 Number of processor faces = 44 Number of boundary faces = 6866 Number of processor faces = 88 Max number of cells = 3335 (0.019994% above average 3334.33) Max number of processor patches = 2 (50% above average 1.33333) Max number of faces between processors = 88 (50% above average 58.6667) Processor 0: field transfer --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1175 dlopen error : /home/paalj/OpenFOAM/paalj-2.1.0/platforms/linuxGccDPOpt/lib/libccRASModel.so: undefined symbol: _ZN4Foam14incompressible8RASModel11printCoeffsEv --> FOAM Warning : From function dlLibraryTable:pen(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "libccRASModel.so" Processor 1: field transfer --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1175 dlopen error : /home/paalj/OpenFOAM/paalj-2.1.0/platforms/linuxGccDPOpt/lib/libccRASModel.so: undefined symbol: _ZN4Foam14incompressible8RASModel11printCoeffsEv --> FOAM Warning : From function dlLibraryTable:pen(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "libccRASModel.so" Processor 2: field transfer --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1175 dlopen error : /home/paalj/OpenFOAM/paalj-2.1.0/platforms/linuxGccDPOpt/lib/libccRASModel.so: undefined symbol: _ZN4Foam14incompressible8RASModel11printCoeffsEv --> FOAM Warning : From function dlLibraryTable:pen(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "libccRASModel.so" End. __________________________________________________ __________________________________ In Make/files directory I included: _____________________________________ cckOmegaSST.C LIB = $(FOAM_USER_LIBBIN)/libccRASModel _____________________________________ and in system/controlDict libs ("libccRASModel.so"); Any ideas? |
|
May 23, 2013, 05:32 |
|
#4 |
Senior Member
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17 |
Hi,
I have the same problem. I have modified the standard k-epsilon model with extra terms in the k and epsilon equations. It compiles with no error and the simulations runs, converges and the results seems correct. I can run in serial or in parallel but I always receive the same warning as you. Could you detect where was the problem? |
|
October 7, 2015, 23:56 |
|
#5 | |
Member
Lianhua Zhu
Join Date: Aug 2011
Location: Wuhan, China
Posts: 35
Rep Power: 15 |
Hi, I faced the same problem on OF 2.4.0.
I developed a new dsmcFoam wall interaction submodel ($FOAM_SRC/lagrangian/dsmc/submodels/WallInterationModel). Then I compiled it to a new self-defined lib called 'libVarDsmc.so" The serial dsmcFoam run works. But if I use decomposePar, each process issues a Warning like: Code:
From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : /home/lhzhu/OpenFOAM/lhzhu-2.4.0/platforms/linux64IccDPOpt/lib/libVarDsmc.so: undefined symbol: _ZN4Foam20WallInteractionModelINS_9DsmcCloudINS_10DsmcParcelINS_8particleEEEEEE30dictionaryConstructorTablePtr_E --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libVarDsmc.so" Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc | ofslcm | OpenFOAM Community Contributions | 25 | March 6, 2017 11:03 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
error message | cuteapathy | CFX | 14 | March 20, 2012 07:45 |
Large source term in species equation | MACFD | FLUENT | 4 | January 4, 2011 15:16 |
Reaction Source Term in Steady Species transport equation | cfdvenkatesh | Main CFD Forum | 0 | August 19, 2010 10:28 |