|
[Sponsors] |
time varying vector boundary condition using patch normal |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 3, 2012, 11:24 |
time varying vector boundary condition using patch normal
|
#1 |
New Member
Peter Maday
Join Date: Aug 2011
Posts: 14
Rep Power: 15 |
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 |
|
January 3, 2012, 18:10 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
If you go for groovyBC then something like Code:
type groovyBC; timelines ( { name inVel; outOfBounds clamp; fileName "$FOAM_CASE/inVel.data"; } ); valueExpression "-inVel*normal()"; |
||
January 4, 2012, 02:21 |
|
#3 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
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 |
|
January 4, 2012, 06:25 |
|
#4 | |
New Member
Peter Maday
Join Date: Aug 2011
Posts: 14
Rep Power: 15 |
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 |
||
January 4, 2012, 06:36 |
|
#5 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
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:
( (time1 flow1) (time2 flow2) .. .. .. (timeN flowN) ) Code:
( (0 0) (500 0.001) (5000 0.001) ) 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 |
|
January 23, 2012, 17:43 |
|
#6 |
Member
Robin Gilbert
Join Date: Jan 2010
Posts: 66
Rep Power: 16 |
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 { type groovyBC; value uniform 291; valueExpression "291"; gradientExpression "gradT"; fractionExpression "0"; variables "heatFlux=10000;Cp0=1004;rho0=1.292; alphaEff=pow(10,-4);gradT=heatFlux/(alphaEff*Cp0*rho0);" timelines ( name Temp; outOfBounds clamp; fileName "$FOAM_CASE/Temp.data"; ); } Last edited by robingilbert; January 23, 2012 at 18:19. |
|
January 23, 2012, 18:05 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
valueExpression "291+Temp"; or whatever makes physical sense with that timeline |
||
January 23, 2012, 18:32 |
|
#8 |
Member
Robin Gilbert
Join Date: Jan 2010
Posts: 66
Rep Power: 16 |
Oh ok, I am sorry, my mistake.
|
|
June 21, 2012, 12:50 |
|
#9 | |
New Member
Dave Crossley
Join Date: Oct 2010
Posts: 18
Rep Power: 16 |
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 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TimeVaryingMappedFixedValue | irishdave | OpenFOAM Running, Solving & CFD | 32 | June 16, 2021 07:55 |
Adding heat source to chtMultiRegionFoam | maddalena | OpenFOAM Programming & Development | 61 | February 17, 2018 09:33 |
[Commercial meshers] Using starToFoam | clo | OpenFOAM Meshing & Mesh Conversion | 33 | September 26, 2012 05:04 |
Convergence moving mesh | lr103476 | OpenFOAM Running, Solving & CFD | 30 | November 19, 2007 15:09 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 16:57 |