![]() |
Simple straight tube problem
Hi everyone, I've been trying to get OpenFOAM up and running and I'd like to start with an easy, verifiable case of Pouseuille flow through two straight parallel planes. This can be a 2D simulation with no-slip on the solid walls and periodic inlet/outlet velocities. I'd like for the pressures to be "periodic" as well.
I am starting with the channel395 example, use a blockMeshDict similar to the lid-driven cavity except without the moving top, and with cyclic inlet/outlets. I'd like to simulate it with a uniform body force (eg gravity) instead of by specifying the Ubar. However, there are errors whenever pimpleFoam is run. The gravity is specified in a file "constant/g" which I borrowed from the tutorials/multiphase/icoFoam/laminar/damBreak case. I'm also commenting out the lines in the setup files whereever Ubar is specified. Any help getting me set up with this simple case would be very appreciated! The error I get when I hit ./Allrun is: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // |
Try reading the error message why don't you...
So I took a closer look at the error message, and the answer was obviously inside the fvSolution file, where the pressure reference cell for pimple was set incorrectly.
Anyways, I am now having success in running the very simple flow in this geometry so long as I am using the pressureGradientExplicitSource and specifying a Ubar. Is there a way to specify explicitly what the pressure gradient is? It seems like a much simpler task than finding the pressure gradient for some Ubar, but I can't seem to find any documentation on the available options for momentumSource. Is there anything like "constantAccelerationSource" ? I found some old forum posts referring to a "channelFoam" tutorial, but I'm guessing that's depracated now and that channel395 is the only one. Any help would still be very much appreciated! |
So I am plugging away again, trying to decipher the doxygen (which isn't fully compiling for some reason) and discovered that there is a momentumSource called "vectorExplicitSetValue" which is an explicit typed class of "explicitSetValue". However, there is no documentation on what the options are for explicitSetValueCoeffs or vectorExplicitSetValueCoeffs. Is there a better documentation or example set for this? The most I could find was one older post asking for help, where no one answered him. I hope that isn't what happens to this thread...
Here was his post: Code:
momentumSource { |
So I did manage to get this working now, using the "semiImplicitSource" instead of the "vectorExplicitSetValue". From my prodding around, it seems that "vectorExplicitSetValue", used as above but with "U" instead of "F", directly sets the value of velocity at each time step, which is not what I want.
However, the semiImplicitSource seems to add a source term at each time step, which is precisely how I can treat my simulation. The only thing I don't understand now is the difference between "absolute" and "specific" in the options. I only know that for this simple case, using "absolute" gives a result about 10x bigger than expected, but "specific" gives the expected result. Here is my fvOptions for any future foamers (myself included): Code:
momentumSource |
All times are GMT -4. The time now is 07:47. |