storeOldTime() and groovyBC oldTime()
Hey all,
for a more complex boundary I need to know the previous mag of a vector field, to be able to compute the gradient (sign is important). For that I checked goovyBC and want to use oldTime(field). This is only working if the old field exist. In my case I get the same values for the old and actual value: Code:
"HF=sum(mag(heatFlux));" Therefore I implemented the following line in my code: Code:
heatFlux.storeOldTime(); Can somebody suggest something? Thanks for any help. |
It would be also possible if we can define a boolean in groovy that is not changing till some criterion is reached again.
Hence I am not getting a result with groovyBC, I will code this into my solver and create a variable that can be called by groovyBC. |
Hi Tobi;
To have the previous time step variable value i guess the oldTime() function could be used. Saideep |
Hi,
thanks for the replay. As I showed in the first post, the values were the same: Code:
"new=max(magHeatFlux);" Anyway. I solved this problem now using C++ in the solver. Here I generated a new register field on which groovy has access. Its like a switch and in groovy I have no access like: Code:
"TonOff=max(Ton);" Unfortunatelly Ton is a volScalarField at the moment that stores 0 or 1 (for all cells). Its working fine but the better way would be to generate a registry object as bool or scalar and use that to access in groovy. But at the moment I have no time to figure out how to create a registry booleans / scalar. |
Hi,
Just wanted to know why you are using max function for all the variables? Saideep |
All times are GMT -4. The time now is 01:42. |