|
[Sponsors] |
August 17, 2011, 11:54 |
fanPressure BC
|
#1 |
Member
Sylvain Aguinaga
Join Date: Feb 2010
Posts: 41
Rep Power: 16 |
Hi everybody,
I'm now looking in using the new fanPressure BC introduced in 2.0.0 as I'm not satisfied with the classical fan BC. As far as I have understood this BC prescribes a total pressure jump based on the averaged velocity and pressure over the whole BC surface. I think that it would yield to a much more stable BC than the classical fan BC. I have tested it in two configurations: 1) I make two cyclic patches using the createBaffle utility like for a classical fan condition. When I run simpleFoam the code says: --> FOAM FATAL IO ERROR: inconsistent patch and patchField types for patch type cyclic and patchField type fanPressure Indeed if you look into the code, the fanPressure BC is derived from the totalPressure BC which is a type patch. So I moved for the second configuraiton, with two distinct patches fan_upstrem and fan_downstream. Then, when i run the code it says: --> FOAM FATAL ERROR: Attempt to cast type patch to type lduInterface OK, but if one searches for lduInterface in your favorite CFD forum, one can find that this error means that your patches have to be declared as cyclic..... So is FanPressure a cyclic BC like fan, or a patch BC like totaPressure? Is anybody succeed in using this BC? Thanks ahead for your comments Sylvain |
|
August 17, 2011, 12:58 |
|
#2 |
Member
Sylvain Aguinaga
Join Date: Feb 2010
Posts: 41
Rep Power: 16 |
I've found my mistakes... actually I forgot to modify the other variables (U, k, omega) which were still defined as cyclic... which explains the FATAL ERROR. Sorry to bother you with such a lack of focus from me.
So for the record, the fanPressure BC works exactly as the totalPressure BC. I copied the totalPressure BC setup from the pimpleFoam/TJunction Tutorial. only the p file as to be modified with the example given in the .H file of the source code. Warning: the code will ask you for the gamma constant ( totalPressure legacy ?) fan_uptream { type fanPressure; patchType totalPressure; fileName "./constant/fanCurve"; // Fan curve file name outOfBounds clamp; // (error|warn|clamp|repeat) direction out; // Direction of flow through fan p0 uniform 0; // Environmental total pressure value uniform 0; // Initial pressure gamma 1; } fan_downstream { type fanPressure; patchType totalPressure; fileName "./constant/fanCurve"; // Fan curve file name outOfBounds clamp; // (error|warn|clamp|repeat) direction in; // Direction of flow through fan p0 uniform 0; // Environmental total pressure value uniform 0; // Initial pressure gamma 1; } Results look nice!!! Thanks everybody for all your work posted in this forum. Cheers Sylvain |
|
August 23, 2011, 10:06 |
|
#3 |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 |
Hi Sylvain,
can You please explain me exactly what is the format of the "fanCurve" file? What have I to insert into this file? Yours Sincerely, Claudio |
|
August 24, 2011, 06:15 |
|
#4 |
Member
Sylvain Aguinaga
Join Date: Feb 2010
Posts: 41
Rep Power: 16 |
Hi,
The fan curve is a table which links the delta_p to your averaged velocity through the fan... Here is an example of what I have prescribed in my example 5 // five points in the table ( (5 100) //(velocity pressure_jump) (10 400) (20 600) (30 400) (40 50) ) I put this file into the constant folder. I am thinking about this BC compared to the classic fan one. Its main advantage is that it is more "stable' than the classic one and that you can prescribe other BCs for the other variables such as k or omega. From what I understood it is clearly designed as an "outlet" and "inlet" BC of your domain, and not as a "baffle" BC like in your case (and mine), which is the purpose of the classic fan BC. However from my tests it looks like it also working well as a "baffle BC" provided you have only one single fan in the domain. If you have more than one fan, it is not working any longer as the inlet and outlet patch are not "connected" together. As a consequence you don't have the mass conservation through one fan (but you got it through the whole array of fan, of course, kind of redistribution of the mass flux between the fans) I'm really interested in any feedback about those fan conditions. From my tests, you obtain results which are very differents when switching from one BC to another... from my point of view, it would be nice to have the best of both worlds... a more constrain cyclic BC with specs on the variables and prescription of the pressure jump on the whole patch instead of each cells... to be continued... Sylvain |
|
August 24, 2011, 06:23 |
|
#5 |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 |
Thank You,
the problem is that I have to prescribe a deltaP for each cell (that is, the deltaP varies radially according to a variation law). Moreover, this deltaP is independent from the velocity, it is constant, a value which remains fixed during the simulation. I know for each cell of the patch the deltaP, but I cannot understand how to specify those values (a nonUniform list). Claudio Last edited by claco; August 24, 2011 at 09:57. |
|
August 24, 2011, 06:40 |
|
#6 |
Member
Sylvain Aguinaga
Join Date: Feb 2010
Posts: 41
Rep Power: 16 |
well I think you may have two solutions using a total pressure BC :
1) you are prescribing the ptot profile using using groovyBC 2) you program a little utility which "map" a non uniform ptot on the you patch Sylvain |
|
August 24, 2011, 09:56 |
|
#7 | |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 |
Quote:
Sorry, but I meant a delta of static pressure, non a jump of totalPressure. In the fanPressure, do I have to impose a delta(static)P, or a delta(Total)P?. Because I only know the jump of static pressure, I have no infos about total pressure variation through the fan. Claudio |
||
October 26, 2011, 11:57 |
|
#8 | ||
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
Hello Sylvain and thank you for your contribution!
Quote:
Quote:
thank you! mad |
|||
October 26, 2011, 13:16 |
|
#9 |
Member
Sylvain Aguinaga
Join Date: Feb 2010
Posts: 41
Rep Power: 16 |
Hello Maddelana,
here is what I prescribed for U: Code:
fan_aval { type pressureInletOutletVelocity; value uniform (0 0 0); } fan_amont { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); Let me know if it worked for you hope it'll be helpful Sylvain |
|
October 31, 2011, 09:33 |
Hello Sylvian,
|
#10 | |
Member
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 15 |
Hi Sylvian,
I am also doing some simulation involving a fan in the wind tunnel. I was hoping to use the fanPressure BC that you have described here. However, when I used them for pressure inlet and outlet patch , these BC is not recongnized in OF 2.0.0. OF throws a list of BCs, which has fan but not fanPressure. Can you please tell me how you did it? Regards, Dhruv. Quote:
Last edited by dhruv; October 31, 2011 at 11:36. Reason: wrong question |
||
November 10, 2011, 09:21 |
|
#11 |
New Member
Cesar Retamal Bravo
Join Date: Aug 2011
Posts: 4
Rep Power: 15 |
Hi Sylvian,
quisiera saber como utilizas el createBaffle para crear el parche interno a la malla. podrias tu darme un ejemplo que hallas realizado para poder revisarlo por favor ? saludos |
|
November 10, 2011, 09:22 |
|
#12 |
New Member
Cesar Retamal Bravo
Join Date: Aug 2011
Posts: 4
Rep Power: 15 |
Hi Sylvian,
I would like to know how to use to create the patch createBaffle internal to the mesh. could you give me an example to review Hall on please? regards |
|
November 15, 2011, 04:06 |
|
#13 |
Member
Sylvain Aguinaga
Join Date: Feb 2010
Posts: 41
Rep Power: 16 |
Hola Curico
Voy a escribir en ingles porque es mas facil para mi Mi espanol es un poquito viejo to create an internal baffle, the trick is to define empty patches in blockMesh, so: 1) you add those lines in BlockMeshDict Code:
fan_amont { type cyclic; faces (); neighbourPatch fan_aval; } fan_aval { type cyclic; faces (); neighbourPatch fan_amont; } 2) you have then to "mark" the faces which will form your baffles. You have to use the TopoSet tool. The easier way to use it according to me is to use a TopoSetDict file placed in the system folder. Here is an example of my toposetdict file Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.0 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( //------------------------------------------------------------------------------------ { name cyclicfanFaces; type faceSet; action new; source boxToFace; sourceInfo { box (-1.52 -11 -1)(-1.47 -6.5 3);//bien réglé à la frontiere de deux faces verticales } } //------------------------------------------------------------------------------------ { name cyclicfanFacesSlaveCells; type cellSet; action new; source boxToCell; sourceInfo { box (-1.5 -11 -1)(6 -6.5 3); } } //------------------------------------------------------------------------------------ { name cyclicfanZoneFaces; type faceZoneSet; action new; source setsToFaceZone; sourceInfo { faceSet cyclicfanFaces; cellSet cyclicfanFacesSlaveCells; } } //--------------------------------------------------------------------------- ); // ************************************************************************* // 3) the last part is to use your brand new facezone to actually create the baffle here is the command line for my example Code:
createBaffles cyclicfanZoneFaces '(fan_amont fan_aval)' -internalFacesOnly According to me, the most tricky part is to select the cells with toposet, especially if you mesh with snappy, is quite difficult to setup the appropriate box which select only the faces in the baffle Hope it will be usefull, keep me in touch Sylvain |
|
December 10, 2012, 14:18 |
|
#14 | ||
Member
Jamal
Join Date: May 2012
Location: Freiburg
Posts: 54
Rep Power: 13 |
Dear
I am using topoSetDict to creat fluid and solid regions and facing problems. BlockMesh work properly and give the mesh while topoSet run with no error but causing no affect. BlockMeshDict Quote:
Quote:
Regards Jamal |
|||
September 11, 2014, 07:01 |
|
#15 | |
New Member
Join Date: Dec 2013
Posts: 12
Rep Power: 12 |
Quote:
Can somebody tell me please if in order to setup the fanPressure BC it is compulsory to create two patches (fanInlet and fanOutlet) or just one is sufficient? If 2 patches are compulsory could one of them be inside the computatinal domain and the other one at the boundary? Thank you in advance for your help! Last edited by coroi; September 16, 2014 at 11:07. |
||
October 14, 2016, 07:06 |
Problem with outflow in fanPressure
|
#16 |
New Member
Xabi
Join Date: Sep 2016
Posts: 10
Rep Power: 10 |
Hi,
I have to simulate with OpenFOam 3.0.x an electric motor which is cooled with the help of a fan and I am using the solver "chtMultiRegionFoam" for the heat exchange. I am with the heatExchanger tutorial and i have done the simulation with a fixed pressure and i had no problems, but I am having problems when I insert the fanPressure BC with the airflow. I have tried with the "angleDuct" tutorial also and i had the same problems. So for the setting of the pressure (omitting the other boundaries), the inlet value would be the one from the fanCurve, and the setting i have is this: ---------------------------------------------- inlet { type fanPressure; patchType totalPressure; fileName "./constant/air/fanCurve_148"; outOfBounds clamp; direction out; p0 uniform 100000; //atmospheric pressure value uniform 100000; gamma 1; } outlet { type inletOutlet; inletalue uniform 100000; value uniform 100000; } ---------------------------------------------- The fanCurve is written like this: ---------------------------------------------- 5 ( (0.05 4400) // (flow[m^3/s] pressure_jump[Pa]) (0.07 4300) (0.08 4250) (0.09 4150) (0.10 4100) ) ---------------------------------------------- And the velocity is written like this: ---------------------------------------------- inlet { type pressureInletOutletVelocity; value uniform (0 0 0); } outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } ---------------------------------------------- After running the solver, i get the next error: ---------------------------------------------- request for volScalarField none from objectRegistry air failed available objects of type volScalarField are 17 ( interRegionHeatTransferModel:htc thermo:mu thermosi nut h ... ---------------------------------------------- My guess is that problem is when reading the velocity from the fanCurve as the airflow is defined in m^3/s, whereas the velocity is defined in m/s and as a vector. So does somebody know how to fix this and be able to read the airflow in m^3/s with the fanCurve? |
|
January 19, 2017, 18:46 |
|
#17 |
Senior Member
|
Hi xsa,
have you succed to run your case? Can you post the BCs you set? I'm interested to understand how fanPressureWorks. thanks Last edited by student666; January 20, 2017 at 02:37. |
|
January 20, 2017, 02:48 |
|
#18 |
New Member
Xabi
Join Date: Sep 2016
Posts: 10
Rep Power: 10 |
Hi Student666,
i saw your other thread and i was going to ask you the same question. The only thing i have managed so far is that the simulation starts "running" by setting the BC of the velocity inlet to zeroGradient, because with other BC i got error messages. Code:
0/U inlet { type zeroGradient; } *************************** 0/p inlet { type fanPressure; fileName "fanCurve"; outOfBounds clamp; direction in; U U; phi phi; p0 uniform 0; value uniform 0; gamma 1; } Sorry for not being able to help you for now, if i get it to work i will post it here. Please let us know if you make it work. Good luck Xsa |
|
January 20, 2017, 08:18 |
|
#19 |
Senior Member
|
Hi Xsa,
thanks for your reply. By your setting I supposed your case involved a fan that is blowing air inside the domain; you blow air against your motor in order to cool it down. If that's your set up, it is different from mine, as "my fan" aspire air from the domain. Have a look to this paper https://www.google.it/url?sa=t&rct=j...44224172,d.d24 I think you can get a helping hand if you look to the end, where the author wrote his bcs... I'm still working on it...keep us in touch. Regards |
|
January 23, 2017, 05:23 |
|
#20 |
New Member
Xabi
Join Date: Sep 2016
Posts: 10
Rep Power: 10 |
Hi student666,
First, thanks for the paper! i have given a quick glance and it seems it is going to be of a lot of help for my case setup!! And your guess is true, in my case i blow air through the motor to cool it down, so it is a bit different from your case... I will study the paper thoroughly and hopefully i am able to solve my problems. Hope you find the solution soon, keep it up! Regards |
|
|
|