setting momentum source with fieldSources
I am trying to run the channel simulation channelFoam from the tutorials with the pressure gradient set by using the new featurei in OF 2.1: fieldSources. I seems that it should be possible to use this in stead of adding the momentum source in the solver code, as is done channelFoam. However, I got problems with getting it running.
In the channel channel395 simulation I have added in the fvSolution the PIMPLE properties and UFinal properties. This allow to run the case with pimpleFoam. In the pimpleFoam solver there is now a momentum source at the right hand side of the U-equation: sources(U).
I want to define the pressuregradient, so I have added to following file sourceProperties to the constant directory with the folling contents
Any hints appreciated
For those interested: it appeared to be a bug in the pimpleFoam of 2.1.0, which is already fixed in pimpeFoam 2.1.x, where the call to the sources(U) term UEqn.H was moved below the declaration of rAU.
I tested the source term on the channelFoam tutorial case by adding the file sourceProperties to the constant directory and run pimpleFoam. Indeed the same results as using channelFoam is obtained.
I noticed this thread, even though it is a bit old - I have a question!
When I run pimpleFoam with a pressure source as you describe above, my results seem ok, except for the pressure field.
When I observe them in paraview the pressure gradient isn't apparent (I have a PG of 20, but my results don't indicate this). Everything else seems fine!
Any help on this would be really appreciated!
|All times are GMT -4. The time now is 21:02.|