View Issue Details

IDProjectCategoryView StatusLast Update
0000305OpenFOAM[All Projects] Bugpublic2011-10-05 16:47
ReportermateuspsAssigned Tohenry 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version10.04
Product Version 
Fixed in Version 
Summary0000305: Problems to input a tensorial viscosity, or a fvm::laplacian(<tensor>,<vector>)
DescriptionWhile trying to make some changes in some equations, I had to multiply the fvm::laplacian(nu,U) by a constant tensor. Since the tensor is constant (and diagonal), it should be just the same as using a tensorial viscosity. But I had errors when I tryed to run the solver.

I've already used tensorial diffusivities for the energy equation and other scalar equations, with no problems, but for the motion equation (or for a laplacian of a vector, or div(tensor & grad(U))) it doesn't work. It compiles well, with no errors, but when I run the solver, it breaks, with the following error messages:



#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted:
#3
in "/home/mateus/OpenFOAM/mateus-1.7.1/applications/bin/linuxGccDPOpt/envido"
#4
in "/home/mateus/OpenFOAM/mateus-1.7.1/applications/bin/linuxGccDPOpt/envido"
#5
in "/home/mateus/OpenFOAM/mateus-1.7.1/applications/bin/linuxGccDPOpt/envido"
#6 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#7
in "/home/mateus/OpenFOAM/mateus-1.7.1/applications/bin/linuxGccDPOpt/envido"
Segmentation fault




Then, I think I solved the problem. Apparently the fvm::laplacian(<tensor>,<vector>) wasn't really implemented (at least at versions 1.7.1 and 2.0.0, in which I tryed testing).

I just modified the file laplacianScheme.H in the directory /opt/openfoam171/src/finiteVolume/finiteVolume/laplacianSchemes/LaplacianScheme/, adding the line:

makeFvLaplacianTypeScheme(SS, vector, tensor) \

and recompiled the finiteVolume libso, and apparently it worked properly.
Steps To ReproduceSet some tensor multiplying the nu in fvm::laplacian(nu,U) in any solver, and try to run the solver. The problem occured to me in OpenFOAM 1.7.1 and 2.0.0.
Additional InformationAs already said, I think I solved the problem. Apparently the fvm::laplacian(<tensor>,<vector>) wasn't really implemented (at least at versions 1.7.1 and 2.0.0, in which I tryed testing).

I just modified the file laplacianScheme.H in the directory /opt/openfoam171/src/finiteVolume/finiteVolume/laplacianSchemes/LaplacianScheme/, adding the line:

makeFvLaplacianTypeScheme(SS, vector, tensor) \

and recompiled the finiteVolume libso. Apparently it worked properly, and the result was OK with the identity tensor, but I didn't test the numerical results with other tensors.
TagsNo tags attached.

Activities

henry

2011-10-05 16:47

manager   ~0000686

A complete set of tensorial forms is added to OpenFOAM-2.0.x in
commit 5962fa3f4e6dff2f7ed14f9c085a1d2706b1ad98

Issue History

Date Modified Username Field Change
2011-10-04 02:41 mateusps New Issue
2011-10-05 16:47 henry Note Added: 0000686
2011-10-05 16:47 henry Status new => resolved
2011-10-05 16:47 henry Resolution open => fixed
2011-10-05 16:47 henry Assigned To => henry