How to model a fan fixing the mass flow rate?
Hi everyone,
searching here and there, but i still miss something... maybe open a new thread will help me a bit. I would like to model a fan inside a closed loop circuit, fixing the mass flow and not the pressure jump. The reason is explained here. As an idea, I thought to use a flowRateInletVelocity coupled with a fluxCorrectedVelocity:
Are there any idea on how to model such kind of fan? Regards maddalena |
Hi,
Just to say I have solved this: Quote:
Regards maddalena |
Not sure why you are using fluxCorrectedVelocity at the outlet. zeroGradient should work fine. The mass flow specification at the inlet is already enough to guarantee the same at the outlet. However, your approach will not produce very good results, since the flow going out and the flow going in to the domain will not be well correlated as you would expect in the case of a real fan.
To fix it, you have 3 choices: 1. Modify the actuator disk code from windFoam to goal-seek your specified mass-flow rate. 2. Map the outlet velocity to the inlet using the mapping boundary functions like those used in the CHT boundaries. 3. Modify the fan internal boundary to support fixed mass flow (this is the hardest). |
Hi Eugene,
Quote:
Quote:
Quote:
you refers to the coupling condition on temperature, don't you? What I am wandering is: on the temperature coupling there is no external temperature fixed on one of the coupling side, while I should fix the mass flow rate on one of the fan side. How can I do that? As for the pressure, it should be defined automatically once the velocity is fixed. Am I right? Thanks for your suggestions and ideas, regards mad |
Hi maddelena
I got lost using the actuator disk. so i tried something else. here is what i did:
I added a constant source term to the Ueqn say M. i use setFieldsDict to initialize the source terms so that gets activated in the fan region. i run external scripts to automatically check if i have reached my target mass flow rate. (i use swak4Foam by bernard to calculate mass flow rate through internal face zone) if i have not reached my mass flow rate, the script changes the value of M using setFieldsDict and rerun until it reaches steady state and then check again if i have reached target mass flow rate. I know its not an elegant method to do that using external scripts when OpenFoam is such a great tool. but i am not so good at coding and have been losing so much time on this that i tried my method. atleast i am sort of getting wat i want. |
Hi Eugene,
I tried ur following suggestion: Quote:
Code:
volScalarField magUbar = mag(Ubar); but i am not getting what i want. i know i am doing some stupid mistake. but if i understand this properly, mayb i can do it elegantly. pls help!! |
Hi Robin,
Quote:
It would be great if the solver can check mass flow and adjust it in order to keep the prescribed value, during the same simulation. That is, what Eugene suggested yesterday with a solution similar to the CHT boundaries. Eugene, are you willing to help us?:rolleyes: mad |
Hi,
i just came around this post and like to make a suggestion. If I understood you well, you know about the mass flow and your simulation is incompressible. If so, you can use directMapped-BC for velocity at the inlet and map the velocity profile from the outlet to the inlet. You can use the setAverage option to make sure that your target mass flow is reached. Regards, Stefan |
Quote:
|
Quote:
Regards, Stefan |
Hi Stefan and thanks for joining this thread.
Quote:
Quote:
Quote:
mad |
Quote:
|
Quote:
Thus you suggest:
mad |
I'd would do it vice versa:
Quote:
Regards, Stefan |
that looks better. like maddelena asked, what abt k and epsilon?? and for my simulation i also have Temperature field. any suggestions on that??
|
Quote:
Code:
outletFan Quote:
Thanks for your time! mad |
guys one more thing.... isnt there a way to modify the channelFoam to get constant flow rate across the required domain? just a thought. i tried but dint work out. maybe if someone with a better understanding can give a hint?
|
One more question:
This is my 0/U: Code:
outletFan I do not like to fix my fan velocity, since it will affect the velocity field inside my domain as well, while it should be calculated by the solver! |
Quote:
|
Stefan, can you comment on this?
Quote:
Code:
--> FOAM FATAL ERROR: mad |
Hi Mad,
sorry it was my fault. The definiton in the boundary file is correct, but in your U file the BC-type must be directMapped (not directMappedFixedValue). Sorry again, Stefan |
Quote:
Just as an information: do you know why the BC condition is directMapped and in the /OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/fields/fvPatchFields/derived folder there are:
Cheers mad |
I think directMappedVelocityFluxFixedValue recyles the velocity and the flux whereas directMappedFixedValue (which we are using here) only patches velocity in this case.
The biggest disadvantage of the first one if you try to apply it to your case is that you can't set the average value there. My guess is, that you could need this BC for compressible simulations where phi is not only a function of U. Regards, Stefan |
Quote:
I have the first simulation running. I will report as soon as I have some results. Thanks for your support. cheers mad |
hello,
I have a heat source (constant heat addition using setFields) very next to the fan. i dont know the temperature at the fan. i just have a heat source befor it. how do i set up the temperature at the fan boundary?? do i use directMapped as well?? so its like: fanOutlet=domain inlet fanOutlet { type directMapped; value uniform 0; setAverage false; } what abt fanInlet?? |
Hi Robin,
are you using cht? If it is so, Quote:
Quote:
mad |
i am using simpleFoam.
|
1 Attachment(s)
Hello,
bad news: the following caused velocity instabilities (i guess due to the numerics) close to the fanOutlet,
Note that at the moment turbulence is switched off to not include k and epsilon. I used the fixedValue p = 0 BC since I usually fix velocity in one of the boundary and pressure in one of the other. However, Stefan suggested here a zeroGradient + pRefCell close to the outlet. How can I get its number? where should I check it? EDIT: answer here: http://www.cfd-online.com/Forums/ope...-pressure.html Is it correct to not fix pressure anywhere and use zeroGradient only? May the pressure fixedValue be the reason of these instabilities? cheers mad |
No way. Simulation crashed after few time steps using the zeroGradient condition at the inlet and at the outlet. Ideas?
mad |
If you have switched off turbulence, what is your Re and viscosity? If you do not have a reasonably high nu and Re is high as well, the solution will of course blow up (especially if you are using 2nd order numerics).
The flow is behaving very strangely downstream of the fan. Do you have any idea why this is? I suggest you look at the velocity values at the inlet in a bit more detail. |
2 Attachment(s)
Hi Eugene,
I used a laminar model only on the first 100 time steps, just to help the solver. Then I switched on the turbulence. My schemes are the following:
In order to make the simulation more stable, I also lowered relaxation factor:
What parameters should I change to tune my simulation? mad |
Hi Maddalena,
I'm not sure how to proceed next. You numerics looks stable. You could try mapping your turbulence properties as well and use pure upwind convection for turbulence. I guess you are having stability problems because there is a discontinuity in your pressure field over the fan while your velocity field is continuous. You could try reverse mapping your pressure field with a prescribed mean, but this might just make things worse. You could also try zero gradient p at the outlet, but again this will not necessarily improve stability. There is a "fixedMeanValue" boundary type in OpenFOAM-Extend that might be a better fit for your problem. |
Hi Eugene and thank you for your answer.
Quote:
Quote:
Quote:
Cheers mad |
Quote:
|
Hi Maddalena,
Sorry for digging out this old post. I'd like to set the mass flow rate on a fan. But I've a problem with my mesh, and I think you could help me. I made my mesh with Gambit, setting the fan as "fan". I import it with the "fluent3DMeshToFoam" utility. The fan become a cyclic patch, and when I give the next BC: type flowRateInletVelocity; patchType cyclic; flowRate 8.79; value uniform (2 0 0); it's applied on both sides of the fan... with external normal :( Could you, please, teach me how to use the mesh utilities in order to have a "fan_inlet" and a "fan_outlet"? unless there is an other solution, like giving a vector. I've successfully tried to give a velocity, but that's not what I need. Regards, Nicolas |
Hi Nicolas,
of course this will not work: Quote:
As for concluding my discussion above, I used a modified simpleFoam version in such a way that some properties may be given to specific cellSets. robingilbert made this solver, so you should ask to him to have a copy of it. mad |
Hi Maddalena,
Thank you very much for your answer. I gave up this option and dug a bit more the standard "fan" BC. In fact I had a problem since I regrouped 3 fans in the same patch. I fixed it by splitting my patch and setting up the pressure jump with the right sign for each fan. Now this is working, I'd like to complicate. I described my case in this thread, in which you wrote a lot :) Regards, Nicolas |
same problem
Hi Maddalena,
I am trying to simulate a fan in a channel, and I am having the same problem. The pressure at the inlet of the fan is higher than the pressure at the outlet. How did you correct it? Regards, Dhruv. Quote:
|
Hello,
Quote:
What OF version are you using? starting from 2.0.0 there is a new bc to simulate fan properly: http://www.cfd-online.com/Forums/ope...essure-bc.html mad |
flow in opposite direction
Hi Maddalena,
thanks for the reply. The problem was flow going in opposite direction, which I have solved now, by changing the order for the patches in the boundary file. Regards, Dhruv Quote:
|
All times are GMT -4. The time now is 23:17. |