|
[Sponsors] |
How to bring OpenFoam 2.1 viscosityModel to OpenFoam 2.2 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 20, 2014, 04:37 |
How to bring OpenFoam 2.1 viscosityModel to OpenFoam 2.2
|
#1 |
New Member
Marvin
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
Hello,
I'm trying to bring my viscosityModel from OpenFoam 2.1 to OpenFoam 2.2. I was told it worked with 2.1. So I have two questions. Can I simply install OF2.1 besides OF2.2 to check if the viscosity Model really works? The error that comes when typing wmake in OF 2.2 is marvin@marvin-VirtualBox:~/OpenFOAM/marvin-2.2.1/src/transportModels/viscoelastic$ wmake SOURCE=viscoelasticLaws/LPTT/LPTT.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam221/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/LPTT.o viscoelasticLaws/LPTT/LPTT.C: In member function ‘virtual void Foam::LPTT::correct()’: viscoelasticLaws/LPTT/LPTT.C:112:66: error: no match for ‘operator-’ in ‘Foam:perator-(const Foam::tmp<Foam::GeometricField<TypeR, PatchField, GeoMesh> >&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Type1 = Foam::SymmTensor<double>, Type2 = Foam::Tensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Tensor<double>]((*(const Foam::tmp<Foam::GeometricField<Foam::Tensor<double >, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator*(const Foam::dimensioned<double>&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Tensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]((*(const Foam::tmp<Foam::GeometricField<Foam::Tensor<double >, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator+(const Foam::tmp<Foam::GeometricField<TypeR, PatchField, GeoMesh> >&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Type1 = Foam::Tensor<double>, Type2 = Foam::Tensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Tensor<double>]((*(const Foam::tmp<Foam::GeometricField<Foam::Tensor<double >, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator&(const Foam::GeometricField<Foam::SymmTensor<double>, PatchField, GeoMesh>&, const Foam::GeometricField<Foam::SymmTensor<double>, PatchField, GeoMesh>&) [with PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]((*(const Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>*)(&((Foam::LPTT*)this)->Foam::LPTT::tau_)))))))))))) - Foam::fvm::Sp(const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SymmTensor<double>]((*(const Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>*)(&((Foam::LPTT*)this)->Foam::LPTT::tau_)))’ viscoelasticLaws/LPTT/LPTT.C:112:66: note: candidates are: and then there are hundreds of canditates listed at the end it says: make: *** [Make/linux64GccDPOpt/LPTT.o] Error 1 I can't find that file LPTT.o. What can I do to debug? I already looked into the LPTT.c file but don't see what I should change in line 112 :66 .................................................. .......................................row 66 .................................................. ..........................................| .................................................. ..........................................v line 112: - fvm::Sp( epsilon_ / etaP_ * tr(tau_) + 1/lambda_, tau_ ) Has anyone experience with bringing models from one version to a newer version? Is there any changelog or comparable document? Thanks a lot for your help Last edited by Marvin_Rauch; January 20, 2014 at 06:15. |
|
January 20, 2014, 09:55 |
|
#2 | |
Senior Member
|
Hi,
Quote:
|
||
January 24, 2014, 14:13 |
Whole equation
|
#3 |
New Member
Marvin
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
Thanks, I haven't been able to reach my OpenFOAM pc. Here is the equation:
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // tmp<fvVectorMatrix> LPTT::divTau(volVectorField& U) const { // dimensionedScalar etaPEff = (1 + 1/epsilon_)*etaP_; dimensionedScalar etaPEff = etaP_; return ( fvc::div(tau_/rho_, "div(tau)") - fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)") + fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)") ); } void LPTT::correct() { // Velocity gradient tensor volTensorField L = fvc::grad( U() ); // Convected derivate term volTensorField C = tau_ & L; // Twice the rate of deformation tensor volSymmTensorField twoD = twoSymm( L ); // Stress transport equation tmp<fvSymmTensorMatrix> tauEqn ( fvm::ddt(tau_) + fvm::div(phi(), tau_) == etaP_ / lambda_ * twoD + twoSymm( C ) - zeta_ / 2 * ( (tau_ & twoD) + (twoD & tau_) ) - fvm::Sp( epsilon_ / etaP_ * tr(tau_) + 1/lambda_, tau_ ) ); tauEqn().relax(); solve(tauEqn); } I hope this helps you to help me with my problems. Thanks in advance! |
|
January 25, 2014, 08:40 |
|
#4 |
Senior Member
|
From the error message and code I can suppose that OpenFOAM doesn't know how to subtract Tensor from SymmTensor. In the RHS of the equation all terms are SymmTensors except -fvm::Sp(...).
And answering one of your first questions: yes, you can install 2.1.x along with 2.2.2. |
|
Tags |
changelog, lptt, models |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X | gschaider | OpenFOAM Installation | 136 | October 10, 2017 18:25 |
openfoam 2.2 force coefficients 0 | mihaipruna | OpenFOAM Running, Solving & CFD | 9 | February 19, 2017 09:32 |
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 07:25 |
Cross-compiling OpenFOAM 1.6 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 7 | January 19, 2010 16:39 |
OpenFOAM Training and Workshop | Hrvoje Jasak | Main CFD Forum | 0 | October 7, 2005 08:14 |