Update boundary condition only after several iteration
I have to implement a boundary condition of type fixedGradient. The gradient depends from the field value. To implement the boundary condition I have modified the updateCoeff() funcion. Unfortunately in this way the gradient changes in every iteration (becouse in every iteration the updateCoeff() function is called) and the solution became instable.
Is there some way to update the boundary condition value only after several iterations and not every iteration?
I never tried it but the first solution that comes to my mind is to use a counter.
For example, if you want to change every 10 iterations, just make count=count+1 for each one, and when count=10 do (updateCoeffs() & count=0)
Sorry if it seems stupid and I'm far away from the point, I'm a beginner trying to contribute as I can.
Thanks... I have tried this solution yet, but the problem is that updateCoeff() is called every iteration and I don't know how I can block it!
Thanks for you reply...
|All times are GMT -4. The time now is 16:58.|