|
[Sponsors] |
September 9, 2011, 07:50 |
Reynolds Stress Custom BC
|
#1 |
New Member
Bill
Join Date: Jun 2011
Location: UK
Posts: 16
Rep Power: 14 |
Greetings. What I'm trying to do is have an inlet BC calculated in the same way as "turbulentIntensityKineticEnergyInlet" (k calculated using a fractional fluctuation from the mean velocity). Instead of applying the calculated value to k, I'd like to divide it by 3 and apply it to each normal (diagonal) component of the Reynolds stress tensor. I can't find an existing BC which does this. If I'm just being unobservant, please could you point me in the right direction then read no further.
Right, so my custom BC is pretty much just a copy of "$FOAM_SRC/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarF ield.C" with the word "scalar" replaced with "symmtensor" pretty much everywhere. There are two things I can't figure out how to do. The first is actually how to apply the calculated normal stresses to the tensor in the "updateCoeffs()" function. Code:
void Foam::turbulentIntensityRInletFvPatchSymmTensorField::updateCoeffs() { if (updated()) return; const fvPatchVectorField& Up = patch().lookupPatchField<volVectorField, vector>(UName_); const fvsPatchScalarField& phip = patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); /* * //ORIGINAL SCALAR K CALCULATION * this->refValue() = 1.5*sqr(intensity_)*magSqr(Up); * this->valueFraction() = 1.0 - pos(phip); * inletOutletFvPatchScalarField::updateCoeffs(); */ /* * //NEW TENSOR CALCULATION GOES HERE ????????? * want to apply "0.5*sqr(intensity_)*magSqr(Up)" to the diagonal components of R */ fixedValueFvPatchSymmTensorField::updateCoeffs(); } Code:
customBoundaryConditionFvPatchVectorField.C LIB = $(FOAM_USER_LIBBIN)/libcustomBoundaryCondition Code:
EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = -lfiniteVolume Many thanks Will ---- Code:
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64/crt1.o: In function `_start': /usr/src/packages/BUILD/glibc-2.11.2/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::turbulentIntensityRInletFvPatchSymmTensorField::updateCoeffs()': turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x2155): undefined reference to `Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::typeName' turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x221c): undefined reference to `Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::typeName' turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x260e): undefined reference to `Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::typeName' turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x26d5): undefined reference to `Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::typeName' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `__sti__$E': turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x3389): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::constructpatchConstructorTables()' turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x3390): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::patchConstructorTablePtr_' turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x34f0): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::constructpatchMapperConstructorTables()' turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x34f7): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::patchMapperConstructorTablePtr_' turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x3651): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::constructdictionaryConstructorTables()' turbulentIntensityRInletFvPatchSymmTensorField.C:(.text+0x3658): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::dictionaryConstructorTablePtr_' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::fixedValueFvPatchField<Foam::SymmTensor<double> >::type() const': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZNK4Foam22fixedValueFvPatchFieldINS_10SymmTensorIdEEE4typeEv[.gnu.linkonce.t._ZNK4Foam22fixedValueFvPatchFieldINS_10SymmTensorIdEEE4typeEv]+0x3): undefined reference to `Foam::fixedValueFvPatchField<Foam::SymmTensor<double> >::typeName' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZNK4Foam14objectRegistry12lookupObjectINS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEEEERKT_RKNS_4wordE[.gnu.linkonce.t._ZNK4Foam14objectRegistry12lookupObjectINS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEEEERKT_RKNS_4wordE]+0x1c2): undefined reference to `Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::typeName' turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZNK4Foam14objectRegistry12lookupObjectINS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEEEERKT_RKNS_4wordE[.gnu.linkonce.t._ZNK4Foam14objectRegistry12lookupObjectINS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEEEERKT_RKNS_4wordE]+0x288): undefined reference to `Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::typeName' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >(Foam::word const&) const': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZNK4Foam14objectRegistry12lookupObjectINS_14GeometricFieldIdNS_13fvsPatchFieldENS_11surfaceMeshEEEEERKT_RKNS_4wordE[.gnu.linkonce.t._ZNK4Foam14objectRegistry12lookupObjectINS_14GeometricFieldIdNS_13fvsPatchFieldENS_11surfaceMeshEEEEERKT_RKNS_4wordE]+0x1c2): undefined reference to `Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::typeName' turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZNK4Foam14objectRegistry12lookupObjectINS_14GeometricFieldIdNS_13fvsPatchFieldENS_11surfaceMeshEEEEERKT_RKNS_4wordE[.gnu.linkonce.t._ZNK4Foam14objectRegistry12lookupObjectINS_14GeometricFieldIdNS_13fvsPatchFieldENS_11surfaceMeshEEEEERKT_RKNS_4wordE]+0x288): undefined reference to `Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::typeName' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::fvPatchField<Foam::SymmTensor<double> >::type() const': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZNK4Foam12fvPatchFieldINS_10SymmTensorIdEEE4typeEv[.gnu.linkonce.t._ZNK4Foam12fvPatchFieldINS_10SymmTensorIdEEE4typeEv]+0x3): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::typeName' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::fvPatchField<Foam::SymmTensor<double> >::addpatchConstructorToTable<Foam::turbulentIntensityRInletFvPatchSymmTensorField>::~addpatchConstructorToTable()': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZN4Foam12fvPatchFieldINS_10SymmTensorIdEEE26addpatchConstructorToTableINS_46turbulentIntensityRInletFvPatchSymmTensorFieldEED1Ev[.gnu.linkonce.t._ZN4Foam12fvPatchFieldINS_10SymmTensorIdEEE26addpatchConstructorToTableINS_46turbulentIntensityRInletFvPatchSymmTensorFieldEED1Ev]+0x2): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::destroypatchConstructorTables()' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::fixedValueFvPatchField<Foam::SymmTensor<double> >::gradientInternalCoeffs() const': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZNK4Foam22fixedValueFvPatchFieldINS_10SymmTensorIdEEE22gradientInternalCoeffsEv[.gnu.linkonce.t._ZNK4Foam22fixedValueFvPatchFieldINS_10SymmTensorIdEEE22gradientInternalCoeffsEv]+0x6d): undefined reference to `Foam::fvPatch::deltaCoeffs() const' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::fixedValueFvPatchField<Foam::SymmTensor<double> >::gradientBoundaryCoeffs() const': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZNK4Foam22fixedValueFvPatchFieldINS_10SymmTensorIdEEE22gradientBoundaryCoeffsEv[.gnu.linkonce.t._ZNK4Foam22fixedValueFvPatchFieldINS_10SymmTensorIdEEE22gradientBoundaryCoeffsEv]+0x18): undefined reference to `Foam::fvPatch::deltaCoeffs() const' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::fvPatchField<Foam::SymmTensor<double> >::addpatchMapperConstructorToTable<Foam::turbulentIntensityRInletFvPatchSymmTensorField>::~addpatchMapperConstructorToTable()': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZN4Foam12fvPatchFieldINS_10SymmTensorIdEEE32addpatchMapperConstructorToTableINS_46turbulentIntensityRInletFvPatchSymmTensorFieldEED1Ev[.gnu.linkonce.t._ZN4Foam12fvPatchFieldINS_10SymmTensorIdEEE32addpatchMapperConstructorToTableINS_46turbulentIntensityRInletFvPatchSymmTensorFieldEED1Ev]+0x2): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::destroypatchMapperConstructorTables()' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::fvPatchField<Foam::SymmTensor<double> >::adddictionaryConstructorToTable<Foam::turbulentIntensityRInletFvPatchSymmTensorField>::~adddictionaryConstructorToTable()': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZN4Foam12fvPatchFieldINS_10SymmTensorIdEEE31adddictionaryConstructorToTableINS_46turbulentIntensityRInletFvPatchSymmTensorFieldEED1Ev[.gnu.linkonce.t._ZN4Foam12fvPatchFieldINS_10SymmTensorIdEEE31adddictionaryConstructorToTableINS_46turbulentIntensityRInletFvPatchSymmTensorFieldEED1Ev]+0x2): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::destroydictionaryConstructorTables()' Make/linux64IccDPOpt/turbulentIntensityRInletFvPatchSymmTensorField.o: In function `Foam::fvPatchField<Foam::SymmTensor<double> >::snGrad() const': turbulentIntensityRInletFvPatchSymmTensorField.C:(.gnu.linkonce.t._ZNK4Foam12fvPatchFieldINS_10SymmTensorIdEEE6snGradEv[.gnu.linkonce.t._ZNK4Foam12fvPatchFieldINS_10SymmTensorIdEEE6snGradEv]+0x47b): undefined reference to `Foam::fvPatch::deltaCoeffs() const' make: *** [OpenFOAM.out] Error 1 |
|
Tags |
boundary, condition, custom, rstm, tensor |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New implemented algebraic Reynolds stress model | volker | OpenFOAM | 13 | October 21, 2013 00:01 |
Reynolds Stress Models | Jade M | Main CFD Forum | 0 | April 21, 2010 16:38 |
Reynolds Stress Boundary Conditions | tstorm | FLUENT | 0 | July 27, 2009 14:44 |
Questions about the Reynolds stress model | empirer2002 | Main CFD Forum | 1 | January 5, 2006 07:37 |
reynolds stress | tufito | Main CFD Forum | 3 | March 10, 2005 15:40 |