|
[Sponsors] |
January 10, 2022, 11:47 |
Non uniform inlet velocity conditions
|
#1 |
New Member
Anon
Join Date: Dec 2020
Posts: 20
Rep Power: 6 |
Hi all,
I ran a simulation using atmBoundaryLayer to prescribe a log law boundary condition to my inlet conditions over a dune field. However, when I compared the actual output data from a larger scale model which I used to inform my CFD, it does not perfectly follow the log law for boundary conditions and therefore I need to re run a simulation, giving specific heights certain velocities. I now want to try and have an inlet condition which is : (heights are given as above the STL surface) 11.65 ms at 5.00 m 13.94 ms at 15.00 m 14.96 ms at 27.00 m 15.7 ms at 40.00 m 16.35 ms at 55.00 m 16.9 ms at 72.00 m 17.31 ms at 91.00 m 17.96 ms at 112.00 m 18.46 ms at 135.00 m 18.97 ms at 161.00 m 19.48 ms at 191.00 m 20.01 ms at 223.00 m 20.54 ms at 260.00 m 21.03 ms at 302.00 m 21.47 ms at 348.00 m 21.85 ms at 400.00 m 22.13 ms at 457.00 m My blockMesh file is shown below: convertToMeters 1; vertices ( (0 518200 0) (2150 518200 0) (2150 519270 0) (0 519270 0) (0 518200 475) (2150 518200 475) (2150 519270 475) (0 519270 475) ); blocks ( hex (0 1 2 3 4 5 6 7) (40 15 10) simpleGrading (1 1 1) ); edges ( ); boundary ( outlet { type patch; faces ( (0 4 7 3) (1 5 4 0) ); } inlet { type patch; faces ( (2 6 5 1) ( 3 7 6 2 ) ); } DuneField { type wall; faces ( (0 3 2 1) ); } top { type patch; faces ( (4 5 6 7) ); } ); I have looked at using TimeVaryingMappedFixedValue but that doesn't seem to be the right thing for this application It seems like it should be relatively easy but I am unsure how to run the case Any help would be greatly appreciated |
|
January 12, 2022, 11:14 |
|
#2 |
Senior Member
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9 |
If those numbers come from a function, you could implement it in the source code for the atmBoundaryLayer BC. It isn't that scary, you could go to the same file, make a copy of it and (probably) edit this part:
Code:
scalarField Un ( (Ustar(z0)/kappa_)*log(((zDir() & pCf) - groundMin - d + z0)/z0) ); https://www.dam.brown.edu/people/ntrask/CFD/bctut.pdf Custom Boundary Condition with OpenFOAM As an alternative, check out swak4Foam, it's pretty straightforward to use and might be good. Also, there is the "codedFixedValue" BC, but I haven't used it yet. Edit: I think with codedBC would be good. I haven't tested it, but a good starting point could be, in your U file,: Code:
boundaryField {youAtmInletPatchName {}type codedFixedValue; value uniform 0; name codedPatchBC; code #{} rest of you patches BCconst vectorField& faceCenter = this->patch().Cf(); vectorField& windVelocity = *this; forAll(faceCenter, i) {#};windVelocity[i].x() = YOUR FUNCTION HERE; // then zero in other coordinates} Hope some of these help |
|
Tags |
atmboundarylayer, inlet boundary condition, non uniform velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OLAFLOW] The OLAFLOW Thread | Phicau | OpenFOAM Community Contributions | 459 | September 12, 2024 12:47 |
Boundary Conditions | MtnRunBeachBum | OpenFOAM Pre-Processing | 1 | April 30, 2015 17:33 |
simpleFoam Floating point error (Core Dumped) | sam.ho | OpenFOAM Running, Solving & CFD | 2 | December 31, 2013 07:57 |
[swak4Foam] Air Conditioned room groovyBC | Sebaj | OpenFOAM Community Contributions | 7 | October 31, 2012 15:16 |
turbulent jet simulation | antonio_ing | OpenFOAM Running, Solving & CFD | 5 | September 16, 2010 03:31 |