CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   laplacian term in turbulent model (http://www.cfd-online.com/Forums/openfoam-solving/70989-laplacian-term-turbulent-model.html)

chai December 11, 2009 09:07

laplacian term in turbulent model
 
Hi Foamers,
I am a new users to OpenFOAM, and using OpenFOAM 1.6.
I try to do some modification to LRR model.
The l.h.s of the original equation of R is as follows:

Quote:

fvm::ddt(R_)
+ fvm::div(phi_, R_)
- fvm::Sp(fvc::div(phi_), R_)
//- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_)
- fvm::laplacian(DREff(), R_)
+ fvm::Sp(Clrr1_*epsilon_/k_, R_)

The modified l.h.s is as follows:
Quote:

fvm::ddt(R_)
+ fvm::div(phi_, R_)
- fvm::Sp(fvc::div(phi_), R_)
- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_)
// - fvm::laplacian(DREff(), R_)
+ fvm::Sp(Clrr1_*epsilon_/k_, R_)
Only the laplacian term is modified.

When running pisoFoam after compilation, I receive the error message.
Quote:

#0 Foam::error::printStack(Foam::Ostream&) in "/home/alucard/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/alucard/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::fv::laplacianScheme<Foam::SymmTensor<double> , Foam::SymmTensor<double> >::New(Foam::fvMesh const&, Foam::Istream&) in "/home/alucard/OpenFOAM/alucard-1.6.x/lib/linuxGccDPOpt/libmyIncompressibleRASModels.so"
#4 Foam::tmp<Foam::fvMatrix<Foam::SymmTensor<double> > > Foam::fvm::laplacian<Foam::SymmTensor<double>, Foam::SymmTensor<double> >(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>&, Foam::word const&) in "/home/alucard/OpenFOAM/alucard-1.6.x/lib/linuxGccDPOpt/libmyIncompressibleRASModels.so"
#5 Foam::tmp<Foam::fvMatrix<Foam::SymmTensor<double> > > Foam::fvm::laplacian<Foam::SymmTensor<double>, Foam::SymmTensor<double> >(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>&) in "/home/alucard/OpenFOAM/alucard-1.6.x/lib/linuxGccDPOpt/libmyIncompressibleRASModels.so"
#6 Foam::incompressible::RASModels::myLRR::correct() in "/home/alucard/OpenFOAM/alucard-1.6.x/lib/linuxGccDPOpt/libmyIncompressibleRASModels.so"
#7 main in "/home/alucard/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linuxGccDPOpt/pisoFoam"
#8 __libc_start_main in "/lib/libc.so.6"
#9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/alucard/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linuxGccDPOpt/pisoFoam"
Segmentation fault
Does anyone know why I get this error message?
Any help is appreciated!
Thank you.

tonkiplis November 16, 2011 12:04

Hello,

I am facing exactly the same problem as you, were you able to fix it?


Cheers,

Thierry

chegdan November 22, 2011 18:08

@Thierry

I had some similar problems a little while back. The code that was provided was

Code:


- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_)

Since the implicit laplacian is being used, I believe the first argument in the fvm::laplacian needs to be explicit and cannot contain the R_ term (the variable that is being solved for implicitly). One would need to provide an explicit quantity as a first argument in the implicit laplacian so that the PDE will remain linear and can be solved with a linear system solver. Hope this helps a tiny bit.

edit: I didn't see how old that thread was...so i directed it at Thierry after the fact

tonkiplis November 23, 2011 10:02

Dear Chegdan,

Thanks for your answer.
I see your point, I will try to investigate more in which way to set down the equation in order that it works.

Cheers,

Thierry

maninthemail March 8, 2012 10:28

I don't think it's an an implicit/explit issue. The first term in the laplacian function is automatically assumed explicit, I think. The problem is that OF 2.0 and previous don't have fvm::laplacian(tensor,tensor) functionality implemented. This has been fixed in the 2.0.x git repository, and presumably also in 2.1. I am running the same changes you describe to the LRR (and LaunderGibsonRSTM) in an up-to-date OF without problems. I don't yet have a handle on whether the accuracy of the modelling is improved by said changes.


All times are GMT -4. The time now is 08:58.