# How to model a fan fixing the mass flow rate?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 November 8, 2011, 09:51 #41 Member   Mohammad.R.Shetab Join Date: Jul 2010 Posts: 49 Rep Power: 15 Dear Friends, I have a problem with boundary conditions of my model. As it is shown, It is a centrifugal fan with a half sphere at the inlet and a duct at the outlet. As I know, when the fan works at the maximum flow rate, Inlet(half sphere) would be total-Pressure and outlet would be static pressure equal to zero, which are: Inlet: P: totalPressure U: pressureInletVelocity Outlet: P: fixedValue 0; U: zeroGradient But when we want to model the fan at lower flowrates (means the specific flowrate lower than maximum flowrate) what are the boundary conditions?! As I know from previous investigations in fluent, it is massflow at inlet and outflow at outlet, but what is these BCs in OpenFOAM. I tried these things but residuals for pressure would'nt come down. Inlet: P: zeroGradient U: massFlowRate Outlet: P: zeroGradient with pRefCell U: -massFlowRate or Inlet: P: zeroGradient U: massFlowRate Outlet: P: fixedValue 0 U: zeroGradient Anyone know the answer?! Thanks anyway. Mohammadreza Shetab

 November 12, 2011, 08:42 #42 Member   Mohammad.R.Shetab Join Date: Jul 2010 Posts: 49 Rep Power: 15 still no answer?!!!!!!!

 September 13, 2013, 02:59 #43 Member   Join Date: Aug 2013 Posts: 50 Rep Power: 12 Hi Mohammadreza Shetab, have you manage to get a good result for the performance curve of the fan? i'm now doing the same thing as yours. I have used totalpressure for both inlet and outlet and as for the velocity i used zerogradient. however the result seems to be under estimate when comparing it to the technical sheets from the fan manufacture. any ideas? and how can i set the boundaries of inlet and outlet for velocity and pressure when i want to vary the speed (rpm) and get the flowrate change? tq

 September 13, 2013, 06:19 #44 Member   Mohammad.R.Shetab Join Date: Jul 2010 Posts: 49 Rep Power: 15 Hi, In cases of turbomachineries several boundary conditions are well-known. First, Total pressure at inlet(=0) and Static pressure at outlet(=0). The flow rate will then be changed by varying the value of static pressure for example(10,20,30,....). The second is to use certain flow rates. In this case you should use different flow rates for inlet and zeroGradient at outlet for velocity. The pressure can be zerogradient at both inlet and outlet with a reference pressure or static pressure at outlet(if the flow reaches its fully-developed condition). As your second question, I think the former set of boundary conditions would be fine (Total pressure at inlet(=0) and Static pressure at outlet(=0)). Hope this helps lpz456 likes this.

October 1, 2013, 06:35
#45
Member

Join Date: Aug 2013
Posts: 50
Rep Power: 12
Hi reza,

Quote:
 Originally Posted by mrshb4 The second is to use certain flow rates. In this case you should use different flow rates for inlet and zeroGradient at outlet for velocity. The pressure can be zerogradient at both inlet and outlet with a reference pressure or static pressure at outlet(if the flow reaches its fully-developed condition).
regarding to your suggestion, is it right that i set the U boundary (for massflowrate 0.2)

Code:
```
inlet
{
type            flowRateInletVelocity;
massFlowRate    constant 0.2;
value           uniform (0 0 0);
}
outlet
{
value           uniform (0 0 0);

}```
thanks

 October 1, 2013, 08:37 #46 Member   Mohammad.R.Shetab Join Date: Jul 2010 Posts: 49 Rep Power: 15 Hi, That's right. However if you have any problem with imbalanced flow rates between inlet and outlet in the first time step, change the outlet to: outlet { type zeroGradient; value uniform (0 0 0.1); } (I supposed that the normal vector of the outlet is towards the Z-direction and has an area twice your inlet, so that the mass flow rate of both inlet and outlet in the first time-step get balanced and equals to 0.2)

October 1, 2013, 08:46
#47
Member

Join Date: Aug 2013
Posts: 50
Rep Power: 12
Quote:
 Originally Posted by mrshb4 Hi, That's right. However if you have any problem with imbalanced flow rates between inlet and outlet in the first time step, change the outlet to: outlet { type zeroGradient; value uniform (0 0 0.1); } (I supposed that the normal vector of the outlet is towards the Z-direction and has an area twice your inlet, so that the mass flow rate of both inlet and outlet in the first time-step get balanced and equals to 0.2)
just as you mention, i got the imbalanced flow rates. I will give it a try.

October 1, 2013, 09:00
#48
Member

Join Date: Aug 2013
Posts: 50
Rep Power: 12
Quote:
 Originally Posted by mrshb4 Hi, That's right. However if you have any problem with imbalanced flow rates between inlet and outlet in the first time step, change the outlet to: outlet { type zeroGradient; value uniform (0 0 0.1); } (I supposed that the normal vector of the outlet is towards the Z-direction and has an area twice your inlet, so that the mass flow rate of both inlet and outlet in the first time-step get balanced and equals to 0.2)
i set it as below, and still imbalanced error appears
Code:
```    outlet
{
value           uniform  0.;
}

inlet
{
value           uniform  0.;
}```

October 1, 2013, 18:00
#49
Member

Join Date: Jul 2010
Posts: 49
Rep Power: 15
You should specify the normal outlet velocity so that inlet and outlet have the same crossing flow rate. It can be calculated with simple math operations.

Quote:
 outlet { type zeroGradient; value uniform 0.; } inlet { type zeroGradient; value uniform 0.; }

Your BC for pressure is right but you should specify a certain location as well as a reference pressure. You can add this in fvSolution with refCell and refPressure, as I remember.

October 9, 2013, 05:05
#50
Member

Join Date: Aug 2013
Posts: 50
Rep Power: 12
Quote:
 Originally Posted by mrshb4 You should specify the normal outlet velocity so that inlet and outlet have the same crossing flow rate. It can be calculated with simple math operations. Your BC for pressure is right but you should specify a certain location as well as a reference pressure. You can add this in fvSolution with refCell and refPressure, as I remember.
hi,

u have done simulation with the centrifugal fan right?

• you are using MRF as well isnt? for the simpleFoam OF220?
I have problem with BC.

I tried what u suggested but without a success.
Since i know the cross-area of my inlet, i tried using fixedValue for my
0/U BC for inlet
Code:
``` {
type fixedValue;
value uniform (0 0 -2.0723);
}```
• by doing this, is the velocity/mass flow will be constant through out the simulation? ( i need it to be constant)
0/U BC for outlet
Code:
```{
value           uniform (0 0 0);
}```
0/U BC for the rest (static walls)
Code:
```    {
type            fixedValue;
value           uniform (0 0 0);
}```
0/p for inlet
Code:
```{
value           uniform 0 ;
}```
0/p for outlet
Code:
``` {
type            fixedValue;
value           uniform 0 ;

}```
0/p for the rest of static walls i set
Code:
```{
value           uniform 0 ;
}```
after run it, i got a crazy result with velocity up to exp 8

anyone can help me with the BC setup??

MY MRF IN fvOption
Code:
```[MRFSourceCoeffs
{
origin      (0.0 0 0.);
axis        (0 0 1);
omega       806.342;
}```
thank you

 October 11, 2013, 16:05 #51 Member   Join Date: Jun 2011 Posts: 51 Rep Power: 14 Hi nash, The setup depends in what you want to test. If you want to test the max flow condition, which in turns means no pressure rise, you should setup the inlet and outlet BC' as pressure one. The value of the pressure should be the same at both BC's. If you are looking for a another operating point in the curve of the fan, you may have two options...Either you impose the pressure rise or the massflow. I will say that likely it will be better impose the massflow and try to match the pressure rise. I will suggest you to impose the massflow in the outlet and ambient pressure in the inlet. For a good accuracy, do it with sliding mesh instead of MRF. Regards, nash likes this.

October 11, 2013, 19:22
#52
Member

Join Date: Aug 2013
Posts: 50
Rep Power: 12
Quote:
 Originally Posted by cfdivan Hi nash, The setup depends in what you want to test. If you want to test the max flow condition, which in turns means no pressure rise, you should setup the inlet and outlet BC' as pressure one. The value of the pressure should be the same at both BC's. If you are looking for a another operating point in the curve of the fan, you may have two options...Either you impose the pressure rise or the massflow. I will say that likely it will be better impose the massflow and try to match the pressure rise. I will suggest you to impose the massflow in the outlet and ambient pressure in the inlet. For a good accuracy, do it with sliding mesh instead of MRF. Regards,
I tried the simulation but the pressure seems to be smaller than that of performance curve from manufacturer.

If yes, then which rho is used by simplefoam? I need this to get the actual pressure.

Is there any possibility to change density in simplefoam?
I read that one could change the nu value, which actually change the density with nu=mu/rho.

Again can somebody point out what are default value for rho mu and nu use by simplefoam?

October 18, 2013, 08:34
k Omega SST
#53
Member

Join Date: Aug 2013
Posts: 50
Rep Power: 12
Quote:
 Originally Posted by cfdivan Hi nash, The setup depends in what you want to test. If you want to test the max flow condition, which in turns means no pressure rise, you should setup the inlet and outlet BC' as pressure one. The value of the pressure should be the same at both BC's. If you are looking for a another operating point in the curve of the fan, you may have two options...Either you impose the pressure rise or the massflow. I will say that likely it will be better impose the massflow and try to match the pressure rise. I will suggest you to impose the massflow in the outlet and ambient pressure in the inlet. For a good accuracy, do it with sliding mesh instead of MRF. Regards,
the results now is only ok but i think i need to setup my k omega and nut dictionary since i used the tutorial case from motorbike.

for the inlet i set based on the discussion in this forum regarding k-omegaSST.
but for the wall i think its quit confusing since there is no guide or any confirmation for the setup, due to wall function.

Anyone can give me any hint??

 January 8, 2016, 18:11 fanBC PROBLEM #54 Senior Member   nasir musa yakubu Join Date: Mar 2014 Location: Birmingham Posts: 109 Rep Power: 12 Hello, I am trying to, to use the fan BC to model a flow through a volumetric receiver, but i but after running splitMeshRegions -cellZones -overwrite , i get the following error: Code: ```parallels@ubuntu:~/OpenFOAM/OpenFOAM-3.0.x/chtMRF\$ splitMeshRegions -cellZones -overwrite /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 3.0.x-5ead44c48e61 Exec : splitMeshRegions -cellZones -overwrite Date : Jan 08 2016 Time : 23:04:08 Host : "ubuntu" PID : 15339 Case : /home/parallels/OpenFOAM/OpenFOAM-3.0.x/chtMRF nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Creating single patch per inter-region interface. Trying to match regions to existing cell zones. Number of regions:19 Writing region per cell file (for manual decomposition) to "/home/parallels/OpenFOAM/OpenFOAM-3.0.x/chtMRF/constant/cellToRegion" Writing region per cell as volScalarField to "/home/parallels/OpenFOAM/OpenFOAM-3.0.x/chtMRF/0/cellToRegion" Region Cells ------ ----- 0 54478 1 633047 2 335317 3 54477 4 111602 5 155631 6 202048 7 250781 8 296633 9 345799 10 396956 11 454148 12 499275 13 637728 14 312776 15 261108 16 345788 17 376148 18 410368 Region Zone Name ------ ---- ---- 0 10 inlet 1 17 insulator 2 18 lens 3 1 outlet 4 15 s1 5 13 s2 6 16 s3 7 7 s4 8 9 s5 9 6 s6 10 5 s7 11 11 s8 12 14 s9 13 3 s10 14 2 s11 15 0 s12 16 12 s13 17 4 s14 18 8 s15 Sizes of interfaces between regions: Interface Region Region Faces --------- ------ ------ ----- Reading volScalarField IDefault --> FOAM FATAL IO ERROR: inconsistent patch and patchField types for patch type cyclicAMI and patchField type calculated file: /home/parallels/OpenFOAM/OpenFOAM-3.0.x/chtMRF/0/IDefault.boundaryField..* from line 25 to line 25. From function fvPatchField::New(const fvPatch&, const DimensionedField&, const dictionary&) in file /home/parallels/OpenFOAM/OpenFOAM-3.0.x/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 172. FOAM exiting parallels@ubuntu:~/OpenFOAM/OpenFOAM-3.0.x/chtMRF\$``` i have the dropbox link to my case and a more detailed explanation of my issue in the following thread http://www.cfd-online.com/Forums/ope...tml#post580157 kind regards

 January 18, 2016, 06:20 Radial Fan BC #55 New Member   ravi Join Date: Nov 2013 Posts: 10 Rep Power: 12 Hi all. I am a beginner in OpenFOAM and working on simulation of radial fan using MRF method (simpleFoam + fvOptions and using cyclicAMI). My workflow is described as follows : 1. Created 3 individual meshes (Suction, Impeller and Volute) 2. Merged them thru mergeMeshes 3. Changed the polyMesh/boundary file to incorporate cyclicAMI patches. 4. Did splitMesh to create cellzones I am stuck at giving boundary conditions. Intended BC's are Total Pressure at Inlet and Mass flow rate at outlet. Please guide me for 0/U, 0/p, 0/nut, 0/epsilon and 0/k files.

 January 18, 2016, 06:52 #56 Senior Member   nasir musa yakubu Join Date: Mar 2014 Location: Birmingham Posts: 109 Rep Power: 12 Hello Ravi, I am actually still stuck with the same problem but resolving it slowly and painfully. the best thing i think is to upload pics of your mesh, paste a copy of your log files and how you specified you boundary file, are you ale to splitMesh to create cleanse successfully? you can start looking at these in the mean time: http://www.cfdsupport.com/OpenFOAM-T...rt/node85.html http://www.cfdsupport.com/OpenFOAM-T...rt/node88.html http://www.cfdsupport.com/OpenFOAM-T...t/node101.html http://www.cfd-online.com/Forums/ope...mplepatch.html http://www.cfd-online.com/Forums/ope...ible-flow.html if you do find a solution, please let me know, and i will keep you updated on my progress. i have tried the cyclic and mappedPatch and now back to trying to achieve the same result using just patch for my inlet and outlet in the boundary file but still struggling, however my simulation runs for hours before crashing due to floating point error. best regards Nas Last edited by esujby; January 19, 2016 at 06:33.