|
[Sponsors] |
March 29, 2014, 15:25 |
Inlet boundary advice
|
#1 |
New Member
David H.
Join Date: Oct 2013
Posts: 25
Rep Power: 12 |
Hello all, I've been working with OpenFOAM for some time now, and I'm trying to model a bluff body inlet jet for LES.
I'm trying to keep my mesh structured and orthogonal, so I'd like to keep a simple graded blockMesh. At this time, I'm trying to model the bluff body by creating a boundary condition on the inlet face that can map or specify a velocity distribution. For example, r=0 to r=5, U=10 r=5 to r=20, U=0 r=20 to r=30, U=5 My first stab at this was creating a blockMesh with the cylindrical jet modeled as a square. I'd like to be able to assign velocity by some step function or parabolic distribution based on the radius. I have tried to create a boundary condition, but I'm not having much luck with it. I've also tried using the pitzExpMapInlet tutorial as an example and mapping velocities to points, but not having a lot of luck there either. Can someone point me in the right direction to get started with this creating a custom boundary condition? |
|
March 30, 2014, 08:53 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
You can use the setFields utility to modify boundary conditions locally. See the tutorial examples using this utility, e.g. by searching for setFieldsDict in $FOAM_TUTORIALS:
Code:
find $FOAM_TUTORIALS -name setFieldsDict |
|
March 30, 2014, 13:51 |
|
#3 |
New Member
David H.
Join Date: Oct 2013
Posts: 25
Rep Power: 12 |
I was under the understanding that setFields could set the initial field / initial condition for a specified field or region of a field.
In my experience with creating a field, I wasn't able to get the field to stay as a boundary condition applied at each step. I modified an application that created an initial internal field based on an approximate analytic solution. I wrote the application to create the field on the boundary, and it wrote the values for the faces, as you would expect in 0.01/U for example I wasn't able to make OpenFOAM ignore the specified boundary conditions "inlet" etc, in lieu of my specified values for the field. I know there are utilities to map the results of one case onto another, but this still does not address the boundary values. It is also possible that I was not operating on the boundary faces or something, so the results did not "stick". But I'm still not convinced this is the best method of this. Ideally, I'd like something like the parabolic boundary condition from 1.5, but modify it to a step-wise defined condition across the face. I had not much success modifying this boundary condition, because I'm not sure I understand how it's really working. |
|
March 31, 2014, 15:04 |
|
#4 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
E.g. in the buoyantPimpleFoam tutorial (hotroom) the temperature boundary conditions for the floor is changed in a way (by setFields), that a few cells have higher temperature than the surrounding ones. They keep this higher value for all time steps (setFields is applied for the 0 time step).
|
|
April 4, 2014, 12:15 |
|
#5 |
New Member
David H.
Join Date: Oct 2013
Posts: 25
Rep Power: 12 |
Looking at the implementation of setFields made me think a bit more about the little application I had started. It was essentially the same thing, but I realized I had not operated on the faces, but the cell centers. As you would expect, these did not properly address the boundary values.
With that sorted out, I now have a working application mapInlet that writes my bluff body inlet conditions. I don't know where I originally picked up some of these pieces, but they came from somewhere on this forum. I appreciate your help, though and do not claim this solely on my own (I couldn't have done it alone ) Here are the useful bits, and I can post up the whole directory if someone is interested or if I make it more general with a dictionary file, etc. Code:
// Define boundary faces label patchi = mesh.boundaryMesh().findPatchID("inlet"); const fvsPatchVectorField& centers = mesh.Cf().boundaryField()[patchi]; fvPatchVectorField& uVel = U.boundaryField()[patchi]; forAll(centers, i) { scalar x = centers[i].x(); scalar y = centers[i].y(); radius_squared = sqr(x) + sqr(y); if (radius_squared <= r0_squared) { uVel[i] = vector(Ux,Uy,u_jet); //Info<< "Zone: Jet "<<uVel[i]<< endl; } if (radius_squared <= r1_squared && radius_squared > r0_squared) { uVel[i] = vector(Ux,Uy,u_bluff); //Info<< "Zone: Bluff"<< endl; } if (radius_squared > r1_squared) { uVel[i] = vector(Ux,Uy,u_coflow); //Info<< "Zone: Coflow"<<uVel[i]<< endl; } } |
|
April 26, 2014, 07:44 |
Help needed
|
#6 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15 |
Dear Fellows
I am trying to simulate a bluff-body stabilized flame. I have used a 2D wedge-typed grid. However, after 0.08 sec it seems that the outer recirculation zone is captured much greater than the actual size and vice versa the inner recirculation zone is very tiny. ( I have attached the desired UMean and the achieved One) This has influenced significantly my temperature profile and the outer peak in Temperature Profile is completely disappeared. I have used the Random Inflow Boundary condition i.e. turbulentInlet. This is my 0/U file: Code:
boundaryField { OUTLET { type zeroGradient; } COFLOW { type turbulentInlet; referenceField uniform (0 40 0); fluctuationScale (0.01 0.1 0.01); value uniform (0 40 0); } SIDE { type zeroGradient; } FUEL { type turbulentInlet; referenceField uniform (0 118 0); fluctuationScale (0.02 0.6 0.02); value uniform (0 118 0); } WALL { type fixedValue; value uniform (0 0 0); } front { type wedge; } back { type wedge; } } Would you PLZ hint me that what is my problem in not capturing the outer recirculation zone (air-driven RZ) correctly? Do I need to do a 3D simulation or maybe modifying my 0/U file? I have simulated the fuel and air inflows from the beginning of the injection according to mentioned 0/U file. Regards Bobi |
|
July 21, 2014, 22:34 |
|
#7 |
New Member
David H.
Join Date: Oct 2013
Posts: 25
Rep Power: 12 |
I'm not sure if you ever figured out a solution for your simulation.
You might want to try the mappedPatch boundary condition, check out the pitzDailyMapped tutorial for an example. I found the mapping condition sometimes over-exaggerates the magnitude of the fluctuations, especially depending on where the values are sampled from. That being said, it would help your jet become turbulent in a method that uses "real" coherent turbulent structures. This may be better than random noise which has been shown ineffective in LES turbulence simulations, since random fluctuations are not good at creating useful eddies. Also, turbulence is 3D in nature, and your wedge geometry is likely adding numerical complications around the shear layers of the jet. I'd recommend checking out my other post about topoSet, and using a regular cubic mesh. |
|
February 29, 2016, 22:10 |
|
#8 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 12 |
Dear David,
I am interested in which software is used to plot the attached velocity figure? Best regards. Wen |
|
February 29, 2016, 22:52 |
|
#9 |
New Member
David H.
Join Date: Oct 2013
Posts: 25
Rep Power: 12 |
My plot from the first post is just a cut plot from ParaView, showing the midplane from the side.
|
|
February 29, 2016, 22:55 |
|
#10 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 12 |
Then how you adjust the legend with the same size of numbers and (set the number on one size of the legend?) ?
I use the version of paraview 4.1, there is no way to adjust the numbers in the legend... Best regards, Wen |
|
February 29, 2016, 23:01 |
|
#11 |
New Member
David H.
Join Date: Oct 2013
Posts: 25
Rep Power: 12 |
I'm not sure I understand what you are asking. Can you post a picture of what you have and describe how you want it to look?
|
|
March 1, 2016, 01:26 |
|
#12 | |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 12 |
Quote:
My best regards, Wen |
||
March 5, 2016, 09:14 |
|
#13 |
New Member
David H.
Join Date: Oct 2013
Posts: 25
Rep Power: 12 |
Hi Wen, I see what you are asking. For the plot in the first post, It's really just the legend moved to the bottom, and the minimum and maximum are cropped from the picture. I was using this plot (LES instantaneous) alongside a time-averaged velocity field as a demonstrative point on a poster, so the "real" data min/max were not needed.
That being said, You can choose the range on the color map editor, second icon (I think you know this), in at least ParaView 4.1.0 which I was using with OpenFoam 2.3.0 last. This sets the range of displayed data. A workaround to get the desired displayed precision on the maximum/minimum, eg. 0.008123 (maximum) to show as 0.008 is to set this as the discrete top of the range. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 91 | December 21, 2022 04:50 |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 05:57 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 03:32 |
user soubroutine of inlet boundary conditions | Charlie Beghein | Siemens | 2 | August 30, 2002 02:03 |