Source in k-equation
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! |
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 |
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::open(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::open(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::open(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::open(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::open(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::open(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::open(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? |
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? |
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) Quote:
|
All times are GMT -4. The time now is 18:46. |