CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   change fixedGradient BC during run (https://www.cfd-online.com/Forums/openfoam/89178-change-fixedgradient-bc-during-run.html)

fisch June 7, 2011 05:29

change fixedGradient BC during run
 
Hello,

i want to change my boundary conditions during the run of my solver.
So specifying Dirichlet BC was more or less easy to implement (overwriting the boundaryFields of the variables).

Now I want to overwrite the value of the fixedGradient BC during the runtime for other variables.
Is this possible and easy to access?

Thank you for any advice,

rupert

gschaider June 7, 2011 10:16

Quote:

Originally Posted by fisch (Post 310818)
Hello,

i want to change my boundary conditions during the run of my solver.
So specifying Dirichlet BC was more or less easy to implement (overwriting the boundaryFields of the variables).

Now I want to overwrite the value of the fixedGradient BC during the runtime for other variables.
Is this possible and easy to access?

Thank you for any advice,

rupert

Use groovyBC? Unless you really want to write your BC in C++

fisch June 7, 2011 10:41

thanks bernhard for the quick reply,

there are unfortunately questions left:
Is there no problem using the groovyBC specifying values for "valueExpression" and for "gradientExpression" ???
I thought that it is the only way to specify (e.g. using) simpleFoam either the velocity as dirichlet and the pressure as neumann or the other way around. Now it seems that i can specify on both fields dirichlet and neumann!?

Can you explain that to me?

One more thing: What is, if i dont specify one of these two keywords ( "valueExpression" or "gradientExpression)??

thanks a lot,
rupert

gschaider June 8, 2011 06:53

Quote:

Originally Posted by fisch (Post 310876)
thanks bernhard for the quick reply,

there are unfortunately questions left:
Is there no problem using the groovyBC specifying values for "valueExpression" and for "gradientExpression" ???
I thought that it is the only way to specify (e.g. using) simpleFoam either the velocity as dirichlet and the pressure as neumann or the other way around. Now it seems that i can specify on both fields dirichlet and neumann!?

Can you explain that to me?

groovyBC is a child class of the mixed-BC. Have a look in the USerGuide for that
Quote:

Originally Posted by fisch (Post 310876)
One more thing: What is, if i dont specify one of these two keywords ( "valueExpression" or "gradientExpression)??

thanks a lot,
rupert

That is described here:

http://openfoamwiki.net/index.php/Co...s_in_the_patch

fisch June 8, 2011 12:34

Thanks a lot Bernhard,
it seems that it works.

rupert


All times are GMT -4. The time now is 06:13.