|
[Sponsors] |
June 21, 2020, 22:28 |
Accessing heat flux in velocity BC
|
#1 | |
New Member
Daniel Grebe
Join Date: Feb 2020
Posts: 3
Rep Power: 6 |
TL;DR: I'm creating a custom boundary condition where the inlet velocity depends on the heat flux to the patch (radiation and conduction/convection). I'm trying to figure out how to access/calculate the heat flux in this boundary condition.
Long Version of the question: I'm trying to implement the following boundary condition in openfoam: (Leccese 2017, page 35) I'm basing my new boundary condition off of flowRateInletVelocity boundary condition. The only part I'm having trouble with is the wall heat fluxes. Thus far I've tried copying the procedure used in turbulentTemperatureRadCoupledMixed to calculate the heat flux, but it seems to access properties that it has inherited from temperatureCoupledBase. I'm not sure how I would be able to access those properties from my BC which is for velocity and not temperature. The following are the lines that I,m not sure how to implement in my code: Quote:
For background, I'm developing this BC for use with reactingFoam to simulate the regression of a paraffin grain in a hybrid rocket motor. |
||
July 20, 2020, 20:27 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
For a code example of calculating the wall heat flux have a look at the corresponding function object:
https://github.com/OpenFOAM/OpenFOAM...HeatFlux.C#L61 This might help you. Also to access e.g. the pressure field on the patch, you could use code like : Code:
const fvPatchScalarField& pPatch = patch().lookupPatchField<volScalarField, scalar>("p"); |
|
Tags |
boundary condition, heat flux, reactingfoam, velocity inlet |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do you use heat flux as a boundary condition in a non-wall area in UDF? | JuBong | Fluent UDF and Scheme Programming | 2 | July 2, 2018 22:15 |
Doubt - Variable Heat Flux input - UDF | Neethu_N | FLUENT | 1 | December 19, 2017 12:48 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
Heat Flux at Internal walls or Fluid Solid Interface | Mahi | CFX | 3 | October 1, 2012 03:18 |