Mass Weighted Average
2 Attachment(s)
Hey guys, I'm looking to calculate a mass weighted average over a faceZone for pressure using swak4foam. Specifically, this is the equation I'm trying to implement...
Attachment 17559 My question comes when trying to implement. Is it possible in swak4foam to divide a sum by a sum within one expression? Can I do two sums separately and divide them? So far I've only seen expressions that can do one accumulation, such as the one below for mass flow rate... Code:
massin 
Ok, I think I found an equivalent expression. The following function I believe does what I need it to do...
Code:
p_stat2 Also, does anyone know if when you have backflow on a face, does it register as negative mass flow using the phi*flip() formulation? 
Quote:
Yes. You should get the correct backflow if you use flip() (the sign of phi depends on the orientation of the face. Multiplying with flip() "removes" that dependence) 
Quote:
Quote:

Dear Foamers,
I want to use groovybc, in order to create a T bc for a reciculation device. To do this I have do calculate the massfluxweighted temperature of a face. I use the following code: PHP Code:
Thank's in advance 
All times are GMT 4. The time now is 01:11. 