first order gradient scheme ??
I want to implement something seemingly simple, but I've managed to waste half a day on this already...
All I want to do is to implement a gradient scheme for a scalar that is first order upwind. (ie; for a discrete jump in field values, I only want ONE cell to show a value for the gradient)
presumably, something along the lines of:
grad(p) Gauss linearUpwind ;
should work, but this takes me down a path of error messages such as:
request for surfaceScalarField Gauss from objectRegistry region0 failed
available objects of type surfaceScalarField are
where following the suggested options leads to nothing useful.
Any help sincerely appreciated.
I do not know why you need a linear upwind differencing for the pressure gradient. Upwind is applied for the convection term in the N-S equation.
The error message means that the field in the grad operator (in your case p) is not a surfaceScalarField.
grad(p) Gauss linear;
will work in your case.
I never said I was solving NS equations, using the scalar p perhaps confuses people.
Let me graphically illustrate what I'm seeking:
by just not giving up, I got what I wanted:
the magic code:
grad(s) faceLimited Gauss upwind phi 0;
thanks to all who looked in on this.
|All times are GMT -4. The time now is 21:05.|