time varying vector boundary condition using patch normal
Dear forum members,
I would like to specify time varying inlet velocity boundary conditions over the inlet of a pipe. For this purpose I can use the built in timeVaryingUniformFixedValue plus a data file with (timestamp, vector) pairs. As the inlet velocities are assumed to be coaxial with the inlet patch surface normal, having scalar values instead of vectors in the data file would make things a lot easier (there are multiple datasets with different inlet orientations, but the inlet patch is always properly oriented). As far as I know the BC type surfaceNormalFixedValue creates vector BCs from a single scalar input (using the patch normal), I believe this is the behavior I would need using time varying scalars. My question is if there is such a BC type already available, or are other alternative solutions to this problem? Thanks a lot, Peter |
Quote:
If you go for groovyBC then something like Code:
|
Hi there,
A Good day to you (And ofcourse, a Happy New Year too :-)!)... As Bernhard mentioned, groovyBC is a great option for such "out of the normal" boundary conditions. However, there is yet another option in OpenFOAM itself.... I dont know if this is a feature specific to the OpenFOAM-ext versions, but look for the following: timeVaryingFlowRateInletVelocity This gives you exactly what you wanted.... a data-file based scalar input into a patch which is internally converted into a velocity vector normal to the patch faces. You can usually find all the available boundary conditions at the following location in case you have access to it....: "[OpenFOAM source]/src/finiteVolume/fields/fvPatchFields/derived/" Have a great day ahead! Philippose |
Quote:
Due to the complexities of the BC derivation hierarchy could you please clarify how the argument "flowRate" influences the final BC values? You are supposed to set flowRate a scalar value, and provide a file with entries relating timestamps to scalar values representing the flow rate. Is the final flow rate computed as the product of flowRate and the entries in the file? Thanks a lot, Peter |
Hello Peter,
The "flowRate" entry in the boundary condition is only a placeholder, and is not used in the calculation of the boundary condition values. I always set this value to "0". The entry has to be present in the BC, because this BC is derived from the "flowRateInletVelocity" boundary condition, where the "flowRate" entry actually defines the fixed flow rate at that patch.... in the case of "timeVaryingFlowRateInletVelocity", this value is not used. The values that you provide in the data file has to be of the format: Code:
( Code:
( The value of flowRate itself is internally converted into a velocity vector at the patch whose magnitude is "flowRate/(Patch Area)" and whose direction will be normal to each face of the patch. Hope this helps? Philippose |
Hi Phillipose,
Is it not possible to ramp down the values using timelines? i tried giving: ( (90 0) (92 10000) (95 1000) (100 100) (105 0) ) for Code:
hotwall |
Quote:
valueExpression "291+Temp"; or whatever makes physical sense with that timeline |
Oh ok, I am sorry, my mistake.
|
Is it possible to create an oscillating velocity with this boundary condition?
I have looked at your post (below) and based on this it looks as though I could. Quote:
side { type groovyBC; fields ( time Ux Uy Uz ); lookuptables ( { outOfBounds warn; filename "time-velocity.txt"; } ); } from above get this error: Please add the 'value' entry to the write function of the user-defined boundary-condition P.S. I'm trying to apply an oscillating cross-wind hence the "time Ux Uy Uz" If this helps this is a similar problem I have been having http://www.cfd-online.com/Forums/ope...ross-wind.html Any help would be very welcome at this point |
All times are GMT -4. The time now is 22:31. |