|
[Sponsors] |
external variable in codedFixedValue boundary condition |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 9, 2022, 13:24 |
external variable in codedFixedValue boundary condition
|
#1 |
New Member
|
Hi,
I'd like to read an external variable (i.e. defined in another dictionary) within a boundary condition of the kind codedFixedValue. The snippet is more or less like this: Code:
#include "$FOAM_CASE/include/initialConditions" dimensions [0 1 -1 0 0 0 0]; internalField uniform ($Uref 0 0); boundaryField { inlet { // type codedFixedValue; value uniform (1 0 0); name parabolicVelocity; code #{ const vectorField& Cf = patch().Cf(); vectorField& field = *this; const scalar Umax = 1.5*$Uref; forAll(Cf, faceI) { const scalar y =Cf[faceI][1]; field[faceI] = vector(4*Umax/(pow(H,2))*(H-y)*y, 0, 0); } #}; Thank you Claudio |
|
Tags |
boundary condition, codedfixedvalue, variable |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
Using codedFixedvalue to apply totalPressure Boundary Condition | cdm | OpenFOAM Running, Solving & CFD | 2 | June 22, 2013 15:10 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |