settings a gradient on boundary using groovyBC
Hello,
I am experimenting with groovyBC and can successfully use the valueExpression on a patch. When I try to set a gradientExpression for pressure, such as: Code:
gradientExpression "vector(100,0,0)&normal()" but that gives the same result. This is a simple 2D case with an oscillatingFixedValue velocity inlet ran using pisoFoam. Am I interpreting the gradientExpression patch parameter wrong? |
From the documentation:
Code:
* fractionExpression |
Hi Anton,
I have in fact tested the fractionExpression as well, but setting it to 0 did not help. |
Quote:
|
Hi All,
I would like to set up a gradient B.C., ∂p/∂x = cos (2*pi*t) . Is there a way to do this with groovyBC or openfoam official tools? Cheers. |
Quote:
valueExpression "0"; // this doesn't matter fractionExpression "0"; // no value, all gradient gradientExpression "sin(2*pi*time())"; Official tools: you can do something similar with some C++-programming with the codedMixed-BC I guess |
Thanks Bernhard! It works perfect.
|
All times are GMT -4. The time now is 07:37. |