|
[Sponsors] |
Problem in Implementing a non-linear SGS model |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 4, 2015, 15:37 |
|
#21 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer:
__________________
|
|
February 8, 2015, 08:12 |
|
#22 | |
New Member
karar
Join Date: Feb 2013
Posts: 13
Rep Power: 13 |
Quote:
I used the package from post 13, i followed the way that u said post 13. first unpack than build cd nonlinearLESkit ./Allwmake... after compilation Code:
generic@generic-M4700:~/OpenFOAM/generic-2.3.0/src/turbulenceModels/incompressible/nonlinearLESkit$ ./Allwmake wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file LESNonlinearModel.C Making dependency list for source file GennonlinearSGS.C SOURCE=LESNonlinearModel.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam230/src/turbulenceModels -I/opt/openfoam230/src/turbulenceModels/LES/LESdeltas/lnInclude -I/opt/openfoam230/src/turbulenceModels/LES/LESfilters/lnInclude -I/opt/openfoam230/src/transportModels -I/opt/openfoam230/src/finiteVolume/lnInclude -I/opt/openfoam230/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam230/src/OpenFOAM/lnInclude -I/opt/openfoam230/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/LESNonlinearModel.o SOURCE=GennonlinearSGS.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam230/src/turbulenceModels -I/opt/openfoam230/src/turbulenceModels/LES/LESdeltas/lnInclude -I/opt/openfoam230/src/turbulenceModels/LES/LESfilters/lnInclude -I/opt/openfoam230/src/transportModels -I/opt/openfoam230/src/finiteVolume/lnInclude -I/opt/openfoam230/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam230/src/OpenFOAM/lnInclude -I/opt/openfoam230/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/GennonlinearSGS.o '/home/generic/OpenFOAM/generic-2.3.0/platforms/linux64GccDPOpt/lib/libLESNonlinearModels.so' is up to date. wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file Smagorinsky.C SOURCE=Smagorinsky.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam230/src/turbulenceModels -I/opt/openfoam230/src/turbulenceModels/LES/LESdeltas/lnInclude -I/opt/openfoam230/src/turbulenceModels/LES/LESfilters/lnInclude -I/opt/openfoam230/src/transportModels -I/opt/openfoam230/src/finiteVolume/lnInclude -I/opt/openfoam230/src/meshTools/lnInclude -I../LESNonlinear/lnInclude -IlnInclude -I. -I/opt/openfoam230/src/OpenFOAM/lnInclude -I/opt/openfoam230/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/Smagorinsky.o In file included from ../LESNonlinear/lnInclude/GennonlinearSGS.H:42:0, from Smagorinsky.H:53, from Smagorinsky.C:26: ../LESNonlinear/lnInclude/LESNonlinearModel.H: In static member function ‘static Foam::autoPtr<Foam::incompressible::LESNonlinearModel> Foam::incompressible::LESNonlinearModel::adddictionaryConstructorToTable<LESNonlinearModelType>::New(const volVectorField&, const surfaceScalarField&, Foam::transportModel&, const Foam::word&) [with LESNonlinearModelType = Foam::incompressible::LESNonlinearModels::Smagorinsky, Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>, Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]’: ../LESNonlinear/lnInclude/LESNonlinearModel.H:115:9: instantiated from ‘Foam::incompressible::LESNonlinearModel::adddictionaryConstructorToTable<LESNonlinearModelType>::adddictionaryConstructorToTable(const Foam::word&) [with LESNonlinearModelType = Foam::incompressible::LESNonlinearModels::Smagorinsky]’ Smagorinsky.C:41:1: instantiated from here ../LESNonlinear/lnInclude/LESNonlinearModel.H:115:9: error: cannot allocate an object of abstract type ‘Foam::incompressible::LESNonlinearModels::Smagorinsky’ Smagorinsky.H:68:7: note: because the following virtual functions are pure within ‘Foam::incompressible::LESNonlinearModels::Smagorinsky’: /opt/openfoam230/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H:217:37: note: virtual Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam::incompressible::turbulenceModel::divDevRhoReff(const volScalarField&, Foam::volVectorField&) const ../LESNonlinear/lnInclude/LESNonlinearModel.H:115:9: warning: control reaches end of non-void function [-Wreturn-type] make: *** [Make/linux64GccDPOpt/Smagorinsky.o] Error 1 |
||
February 10, 2015, 07:35 |
|
#23 |
New Member
karar
Join Date: Feb 2013
Posts: 13
Rep Power: 13 |
I tried to compile the files separately. LESNonlinear file was compiled successfuly. But when i tried to compile SM-non, it gave me following error
Code:
wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file Smagorinsky.C SOURCE=Smagorinsky.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam230/src/turbulenceModels -I/opt/openfoam230/src/turbulenceModels/LES/LESdeltas/lnInclude -I/opt/openfoam230/src/turbulenceModels/LES/LESfilters/lnInclude -I/opt/openfoam230/src/transportModels -I/opt/openfoam230/src/finiteVolume/lnInclude -I/opt/openfoam230/src/meshTools/lnInclude -I../LESNonlinear/lnInclude -IlnInclude -I. -I/opt/openfoam230/src/OpenFOAM/lnInclude -I/opt/openfoam230/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/Smagorinsky.o In file included from ../LESNonlinear/lnInclude/GennonlinearSGS.H:42:0, from Smagorinsky.H:53, from Smagorinsky.C:26: ../LESNonlinear/lnInclude/LESNonlinearModel.H: In static member function static Foam::autoPtr<Foam::incompressible::LESNonlinearModel> Foam::incompressible::LESNonlinearModel::adddictionaryConstructorToTable<LESNonlinearModelType>::New(const volVectorField&, const surfaceScalarField&, Foam::transportModel&, const Foam::word&) [with LESNonlinearModelType = Foam::incompressible::LESNonlinearModels::Smagorinsky, Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>, Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]: ../LESNonlinear/lnInclude/LESNonlinearModel.H:115:9: instantiated from Foam::incompressible::LESNonlinearModel::adddictionaryConstructorToTable<LESNonlinearModelType>::adddictionaryConstructorToTable(const Foam::word&) [with LESNonlinearModelType = Foam::incompressible::LESNonlinearModels::Smagorinsky] Smagorinsky.C:41:1: instantiated from here ../LESNonlinear/lnInclude/LESNonlinearModel.H:115:9: error: cannot allocate an object of abstract type Foam::incompressible::LESNonlinearModels::Smagorinsky Smagorinsky.H:68:7: note: because the following virtual functions are pure within Foam::incompressible::LESNonlinearModels::Smagorinsky: /opt/openfoam230/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H:217:37: note: virtual Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam::incompressible::turbulenceModel::divDevRhoReff(const volScalarField&, Foam::volVectorField&) const ../LESNonlinear/lnInclude/LESNonlinearModel.H:115:9: warning: control reaches end of non-void function [-Wreturn-type] make: *** [Make/linux64GccDPOpt/Smagorinsky.o] Error 1 |
|
March 2, 2015, 08:38 |
|
#24 |
New Member
karar
Join Date: Feb 2013
Posts: 13
Rep Power: 13 |
Hi All
As i said before I am dealing with the SGS stress instead of the eddy viscosity. i tried to compiled nonlinearLEskit, but it gave me compalition error. I couldnt solve the error. Therefore I have used to DeardorffDiffStress based on GenSGSStress. but this model also use nu_sgs in the calculation of divDevReff(U). for making same things with nonlinearLEskit in the computation of divdevreff, i product 0 to nu_sgs term as follows Code:
nuSgs_ = 0*rho()*sqrt(K)*delta() Best |
|
March 19, 2015, 04:34 |
|
#25 | |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14 |
Quote:
sorry for the late reply. This may be solved when you turn on the debug mode. I can compile this when debug mode is turned on, although I didn't find any error in opti mode on another computer. This is strange, but this may overcome this problem. Anthoer solution may be changing the OF version, to 2.1.1 as I used. I'm not sure if you have solved your problem, but I have a question that you may also face: how to implement a wall function for nonlinear models? As in OF, the nuSgs wall function is implemented to correct the turbulent viscosity, however, if as I have done, the SGS stress is treated instead of the turbulent viscosity, so this method can't be used in the nonlinear models. Do you have any suggestions? Xianbei |
||
May 19, 2015, 14:30 |
|
#26 | |
Member
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12 |
Quote:
I just had the same problem with an empty constructorTablePtr_, and it took me 2h to debug and finally find this thread here. It really did annoy me, because I was sure there was nothing wrong, and checked my code five times anyway.. and the stack message is not really helpful. Do you have any idea if there is any OF-internal possibility to catch this error? I can work with the runTimeSelection interface, but I'm not really familiar, so I don't know where this check could be placed..
__________________
PhD Student at the Institute of Biochemical Engineering at TU München Modelling of fluid dynamics in open photobioreactors. System: OpenFOAM 2.3.x, 64bit, 8 Core Xeon Workstation |
||
May 21, 2015, 17:29 |
|
#27 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
I ask this because I wrote that post 4 months ago and I barely remember what it was all about |
||
May 24, 2015, 12:55 |
|
#28 | ||
Member
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12 |
Quote:
Code:
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(exampleType); Quote:
Just compile (./Allwmake) and run exampleFoam. The error occurs in lib/exampleBaseClassNew.C:18: Code:
Selecting exampleType randomClass Veni... Vidi... Segmentation fault (core dumped)
__________________
PhD Student at the Institute of Biochemical Engineering at TU München Modelling of fluid dynamics in open photobioreactors. System: OpenFOAM 2.3.x, 64bit, 8 Core Xeon Workstation Last edited by Astrodan; May 26, 2015 at 04:30. |
|||
May 26, 2015, 04:33 |
|
#30 |
Member
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12 |
Reasonable argument. Apparently this thread has some negative influence on my concentration .
I uploaded the file and added some additional notes at the end of the last post.
__________________
PhD Student at the Institute of Biochemical Engineering at TU München Modelling of fluid dynamics in open photobioreactors. System: OpenFOAM 2.3.x, 64bit, 8 Core Xeon Workstation |
|
September 20, 2015, 14:26 |
|
#31 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
OK, this was on my to-do list since... March of this year? And I've finally managed to look into this. I've used the code from my post #13 and started a new repository for handling all of the modifications of this proof of concept: https://github.com/wyldckat/nonlinearLESkit The repository now provides the source code adapted to work on:
Best regards, Bruno
__________________
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Two way Fsi Problem- Non linear problem | kmgraju | CFX | 4 | April 28, 2015 12:15 |
the combustion model problem | hanshandiaoke | STAR-CD | 7 | December 2, 2011 04:47 |
the combustion model problem | hanshandiaoke | Siemens | 0 | November 25, 2011 21:37 |
Problem in Buoyancy Model? | dhrubo | CFX | 3 | June 5, 2010 06:32 |
solution diverges when linear upwind interpolation scheme is used | subash | OpenFOAM | 0 | May 29, 2010 02:23 |