patchExpression with alpha in OF 2.2.0 - calculate heat flux
Hello,
I used the patchExpression "alpha)*area()*snGrad(h)" with swak4Foam to monitor the heat flux on a patch in OF 2.1.x. This worked very well. Since I have updated to OF 2.2.0 I get an error "Parser Error for driver PatchValueExpressionDriver at "1.2-3" :"field alpha not existing or of wrong type. Has anybody an idea how to acces the thermal diffusivity in OF 2.2.0 in a patchExpression? Or does anybody know another way to monitor the wallHeatFlux. Thanks RMF |
Quote:
Code:
Will look at this as soon as I find the time. Bug report might speed it up |
This is what I found out as well in the meantime: alpha is called thermo:alpha (I used the "bananas"-trick with a wirteRegisteredObject). But as you've assumed, swak4Foam does not accept the ":" in thermo:alpha.
For those, who have a similar problem: As a workaround I modified the solver and registered an additional field alpha, which is updated at the end of each timestep with the values from thermo:alpha. This is probably inefficient, but it is working for the moment. If there are any better ideas, I'd be glad to hear them. I will report a bug and hope you will find the time to modify swak4Foam in the near future. Anyway, thank you for your answer. Bye RMF |
Quote:
Code:
aliases { |
Quote:
|
Thank you very much. You were really quick. But it's still not working for me (maybe it's my fault):
I changed my function to HeatLoss { type patchExpression; patches (CAVITYIN CAVITYBACK); verbose true; aliases { alpha thermo:alpha } expression"(alpha+alphat)*area()*snGrad(h)"; accumulations (sum); } but now I get the error message: No field of type scalar with the name alpha found Fields of type: volScalarField 17 ( thermo:mu ... Something changed, but it's still not working... Did I use the aliases wrong? The other variation I tested led to the old error message. Bye RMF |
Quote:
|
I am using the buoyantSimpleFoam solver of OF 2.2.0
Thanks Bye RMF |
Quote:
|
Sorry for the late reply: I was busy last week...but I now I had some time to test your modification. It's working now. Thank you very much!
|
All times are GMT -4. The time now is 05:45. |