Using codedFixedvalue to apply totalPressure Boundary Condition
Using OF 2.1.1, I'm trying to use the codedFixedValue boundary condition to apply a polynomial temperature distribution at my inlet. I can apply a static temperature distribution using the following code in my 0/P file:
Code:
INLET https://dl.dropboxusercontent.com/u/60307133/Inlet.jpg However, I want to define this temperature distribution as the totalTemperature at the inlet, not a static temperature. How can I modify my codedFixedValue BC to apply a totalTemperature? Alternatively, would setting the inlet velocity, U, as fixedValue uniform(0 0 0) force a total temperature condition at the inlet? I'm worried that this could cause adverse effects on the solution, though, so I'd rather code a totalTemperature if possible. Thanks for having a read, and for any help. |
Looking through the source code in src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/ I implemented the equivalent calculation as shown below. I'm currently running my case to check whether this yields the desired results, and if anyone spots any potential issues I'd be grateful for the assistance; this is my first time analysing the source code and trying to understand it. However, the BC does compile properly. I'll update again later after running a number of iterations and checking the results.
Code:
INLET |
This worked as needed. For anyone looking at this for their own work, please note that the direction vector must be specified as a unit vector (magnitude = 1) otherwise it will scale your temperatures on you.
Here's a thread on implementing time in your BC: http://www.cfd-online.com/Forums/blo...condition.html |
All times are GMT -4. The time now is 17:54. |