|
[Sponsors] |
May 23, 2017, 09:24 |
Radiation intensity coupling BC
|
#1 |
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 |
Hello,
I would like to solve radiative heat transfer in two adjacent regions with chtMultiRegionFoam. I was able to mimic the solution procedure already present for fluid regions and include it in solid regions. However, I can't figure out how to implement boundary condition to couple radiation intensity. Assumptions: -vfDOM radiation model (we can also assume the same azimuthal and polar angles) -fixed solid/fluid or solid/solid interface (constant shape) -equal refractive index, i.e. no need to redistribute ray intensity that passes through the interface -grey radiation In the greyDiffusiveRadiationMixedFvPatchScalarField.C (OpenFOAM 3.0.x) the essential part of code: Code:
forAll(Iw, faceI) { if ((-n[faceI] & myRayId) > 0.0) { // direction out of the wall refGrad()[faceI] = 0.0; valueFraction()[faceI] = 1.0; refValue()[faceI] = ( Ir[faceI]*(scalar(1.0) - temissivity[faceI]) + temissivity[faceI]*physicoChemical::sigma.value() * pow4(Tp[faceI]) )/pi; // Emmited heat flux from this ray direction Qem[faceI] = refValue()[faceI]*nAve[faceI]; } else { // direction into the wall valueFraction()[faceI] = 0.0; refGrad()[faceI] = 0.0; refValue()[faceI] = 0.0; //not used // Incident heat flux on this ray direction Qin[faceI] = Iw[faceI]*nAve[faceI]; } } |
|
May 25, 2017, 10:43 |
Progress
|
#2 |
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 |
Looking at some other coupling BCs, I've managed to get the first approximation of desired boundary condition. Now, my code looks like this:
Code:
// Get the coupling information from the mappedPatchBase const mappedPatchBase& mpp = refCast<const mappedPatchBase>(patch().patch()); const polyMesh& nbrMesh = mpp.sampleMesh(); const label samplePatchI = mpp.samplePolyPatch().index(); const fvPatch& nbrPatch = refCast<const fvMesh>(nbrMesh).boundary()[samplePatchI]; const greyRadiationIntensityCouplingMixedFvPatchScalarField& nbrField = refCast <const greyRadiationIntensityCouplingMixedFvPatchScalarField> (nbrPatch.lookupPatchField<volScalarField, scalar> (dimensionedInternalField().name()) ); tmp<scalarField> nbrIw(new scalarField(nbrField.size(), 0.0)); nbrIw() = nbrField.patchInternalField(); mpp.distribute(nbrIw()); const radiationModel& radiation = db().lookupObject<radiationModel>("radiationProperties"); const fvDOM& dom(refCast<const fvDOM>(radiation)); label rayId = -1; label lambdaId = -1; dom.setRayIdLambdaId(dimensionedInternalField().name(), rayId, lambdaId); const label patchI = patch().index(); if (dom.nLambda() != 1) { FatalErrorIn ( "Foam::radiation::" "greyRadiationIntensityCouplingMixedFvPatchScalarField::updateCoeffs" ) << " a grey boundary condition is used with a non-grey " << "absorption model" << nl << exit(FatalError); } scalarField& Iw = *this; const vectorField n(patch().nf()); radiativeIntensityRay& ray = const_cast<radiativeIntensityRay&>(dom.IRay(rayId)); const scalarField nAve(n & ray.dAve()); ray.Qr().boundaryField()[patchI] += Iw*nAve; scalarField& Qem = ray.Qem().boundaryField()[patchI]; scalarField& Qin = ray.Qin().boundaryField()[patchI]; const vector& myRayId = dom.IRay(rayId).d(); forAll(Iw, faceI) { if ((-n[faceI] & myRayId) > 0.0) { // direction out of the wall refGrad()[faceI] = 0.0; valueFraction()[faceI] = 1.0; // assumes the same rays, i.e. phi and theta angles, for both sides refValue()[faceI] = nbrIw()[faceI]; // Emmited heat flux from this ray direction Qem[faceI] = refValue()[faceI]*nAve[faceI]; } else { // direction into the wall valueFraction()[faceI] = 0.0; refGrad()[faceI] = 0.0; refValue()[faceI] = 0.0; //not used // Incident heat flux on this ray direction Qin[faceI] = Iw[faceI]*nAve[faceI]; } } Can someone post a code that would retrieve radiation model from neighboring region (on the other side of the interface) to allow me to test for nPhi and nTheta? Would it make sense to use Qin from the other side and distribute intensities uniformly on my side when nbr_nPhi <> nPhi or nbr_nTheta <> nTheta? |
|
Tags |
coupling, multiregion, radiation, transparent interface |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
chtMultiRegionSimpleFoam: Thermal Conduction + Surface-To-Surface Radiation | Zeppo | OpenFOAM Running, Solving & CFD | 16 | May 18, 2017 19:04 |
Fluent Radiation/porous media | Schmitt pierre-Louis | FLUENT | 26 | September 1, 2016 11:29 |
Monte Carlo Simulation: H-Energy is not convergating & high Incident Radiation | volleyHC | CFX | 5 | April 3, 2016 06:41 |
Radiation Modeling | Chris89 | CFX | 20 | August 14, 2014 08:51 |
GETVAR Error in Multiband Monte Carlo Radiation Simulation with Directional Source | silvan | CFX | 3 | June 16, 2014 10:49 |