Page 1 of 1
Set a mass flow rate in usclim
Posted: Thu Apr 29, 2010 7:38 pm
by Nicolas Merigoux
Dear all,
I would like to model a gas inlet on a surface. I am aware that I can set a velocity for the inlet in usclim, but in my case I would rather use a mass flow rate as it seems to be possible when using the GUI.
Could you please tell me if it is possible to do so in usclim and how to proceed.
Thanks in advance.
Nicolas.
Re: Set a mass flow rate in usclim
Posted: Thu Apr 29, 2010 8:34 pm
by Yvan Fournier
Hello,
That should be simple enough. What you need to do is do a first loop on the faces belonging to the inlet, so as to sum their surfaces. You can determine the surface of each face using sqrt(surfbo(1,ifac)**2 + surfbo(2,ifac)**2 + surfbo(3,ifac)**2), so you just need to define a real variable that you initialize to 0, and add the contribution of each face of the inlet.
If you are running in parallel, do not forget to call parsom on your counter (see examples in usproj.f90), as inlet faces may not all be on the same processor, so you need to make the sum global.
In any case, you should check the calculation log (listing) to check that the mass flow used is the want you wanted.
Once you have the total inlet surface and your mass flow, computing the correct velocity to assign to each inlet face should be easy.
If your inlet velocity is not perpendicular to the inlet faces, you may need to replace the surface of each face by surface.velocity_direction, but the approach still works.
Best regards,