CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] groovyBC and residualControl (https://www.cfd-online.com/Forums/openfoam-community-contributions/141406-groovybc-residualcontrol.html)

Tobi September 7, 2014 15:23

groovyBC and residualControl
 
Hi all,

can someone tell me if it is possible to use the groovyBC and change the condition if there is some residualControl criterion reached?

Would be very interesting :)

If not, is it possible to do that in a easy way. For example:

  • steadyState solver
  • calculate till p, U < 1e-4
  • change U_inlet
  • calculate till p, U < 1e-4
  • .
  • .
  • .
  • till end criterion is reached (stop)

Thanks in advance
Regards
Tobi

gschaider September 7, 2014 16:26

Quote:

Originally Posted by Tobi (Post 509401)
Hi all,

can someone tell me if it is possible to use the groovyBC and change the condition if there is some residualControl criterion reached?

Would be very interesting :)

If not, is it possible to do that in a easy way. For example:

  • steadyState solver
  • calculate till p, U < 1e-4
  • change U_inlet
  • calculate till p, U < 1e-4
  • .
  • .
  • .
  • till end criterion is reached (stop)

Thanks in advance
Regards
Tobi

Currently I'm not aware of a way to do this. The value of the residual is usually not available outside the solver.

Possibility would be to use an appropriate fvOptions-element to get the residual of the matrix, write that to a global variable which the groovyBC could then use. But that fvOptions is yet unwritten.

Mojtaba.a September 13, 2014 17:17

Dear Tobi,

I think this can be done using a simple bash script.
Do you want to continue solving from the previous results (which has reached the criterion) or start a new case with initial conditions?

Both are possible using bash, though.

Tobi September 14, 2014 08:24

Hi, well I solved that problem using groovy but without convergence check... (: using bash script would work too.


All times are GMT -4. The time now is 12:46.