|
[Sponsors] |
May 30, 2018, 08:25 |
coded average in mappedPatch
|
#1 |
Member
Fynn
Join Date: Feb 2016
Posts: 48
Rep Power: 10 |
Hi,
I interested in the flow- and heat distribution in a channel and fail to map the temperature back to the inlet. The flow field is periodic, the pressure drops and the temperature increases downstream (channel wall heating). These are my boundary conditions: Inlet: U=mapped U(outlet)Outlet: U=zeroGradientThe temperature field is not periodic because of its build-up along the wall. But as described in http://heattransfer.asmedigitalcolle...icleid=1436662, the dimensionless temperature is periodic. are the constant wall temperature and a local reference temperature, respectively. Now, I want to map the profile, while setting the average such that the dimensionless temperature is kept constant. - I thought of using swak but it doesn't look like direct mapping and averaging is supported.Does anybody have an idea what went wrong here or how this could be fixed? Cheers Fynn Code:
X0 { type mapped; value uniform 0.01; interpolationScheme cell; setAverage true; average #codeStream { codeInclude #{ #include "fvCFD.H" #}; codeOptions #{ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude #}; codeLibs #{ -lmeshTools \ -lfiniteVolume #}; code #{ const IOdictionary& d = static_cast<const IOdictionary&> ( dict.parent().parent() ); const fvMesh& mesh = refCast<const fvMesh>(d.db()); const label id = mesh.boundary().findPatchID("X1"); const fvPatch& patch = mesh.boundary()[id]; const fvPatchScalarField& T = patch.lookupPatchField<volScalarField, scalar>("T"); os<<0.0027; //dummy value #}; }; } |
|
Tags |
averaging, codestream, mappedpatch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
y+ and u+ values with low-Re RANS turbulence models: utility + testcase | florian_krause | OpenFOAM | 114 | August 23, 2023 06:37 |
Floating point exception error | Alan | OpenFOAM Running, Solving & CFD | 11 | July 1, 2021 22:51 |
How to obtain turbulent kinetic energy data from LES model of Ansys CFX? | rsin | CFX | 19 | December 29, 2018 05:43 |
Near wall treatment in k-omega SST | Arnoldinho | OpenFOAM Running, Solving & CFD | 38 | March 8, 2017 14:48 |
coded function object and field average | matthias | OpenFOAM Post-Processing | 3 | June 30, 2014 05:52 |