|
[Sponsors] |
December 10, 2018, 09:37 |
internal radial fan using fan curve
|
#1 |
New Member
anonymous
Join Date: Dec 2018
Posts: 4
Rep Power: 8 |
Hi everyone,
I´m new with OpenFoam and try my first steps. At the Moment I´m struggling with the correct pre-processing of a radial fan in OpenFoam. The fan is in a room and circulate the air in the room. It´s a cylinder in the room as you can see on the picture. I would like to describe the fan with a fan curve. But I don´t know how to define the BC and how to connect the Inlet and Outlet faces so that they will have the same massflow. MRF or SRF is not suitable, because this is just a test model to try to simulate the fan. Later I would like to add this knowledge in another model where I have to simulate a process time of 45 minutes. I would be very pleased about tips to my Problem. |
|
December 28, 2018, 12:50 |
|
#2 |
Member
Kirk Jarvis
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
I find your case interesting. I would recommend setting up either the fan outlet or inlet BC as flowRateInletVelocity which would set the mass flow for the fan. Then on the opposite side of the fan use fanPressure BC which can be either out or in. Here are examples of the p and U you could start with. I would recommend starting with simpleFoam solver or pimpleFoam then go to compressible solver of either.
p Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 100000; boundaryField { #includeEtc "caseDicts/setConstraintTypes" fan_outlet { type zeroGradient; } fan_inlet { type fanPressure; outOfBounds clamp; direction out; readerType openFoam; hasHeaderLine true; file "<constant>/FluxVsdP.dat"; p0 uniform 1e5; } walls { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { #includeEtc "caseDicts/setConstraintTypes" fan_outlet { type flowRateInletVelocity; volumetricFlowRate 8.25; //17500 cfm extrapolateProfile no; rho rho; value uniform (0 0 0); // placeholder } fan_inlet { type pressureInletOutletVelocity; phi phi; } walls { type fixedValue; value uniform (0 0 0); } } // ************************************************************************* // Code:
( (4.1 1493) (5.7 1244) (5.8 922) (6.7 744) (7.5 427) (8.4 248) ); Kirk Last edited by kcjarvis56; December 28, 2018 at 12:54. Reason: attach photo |
|
December 28, 2018, 17:45 |
|
#3 |
Member
Kirk Jarvis
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
My above suggestions doesn't fully operate on the blower curve (because the flow is entered on the fan_outlet BC), this may not be what you are looking for. The mesh is a little more difficult if you want to use cyclic BC similar to the example pimpleFoam TjunctionFan tutorial.
|
|
December 29, 2018, 03:09 |
|
#4 |
Member
Kirk Jarvis
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
This link should also help. fanPressure BC
For both the p and U fan_outlet you can used the same BC as the fan_inlet, just change the direction on the p BC. |
|
January 18, 2019, 06:13 |
|
#5 |
New Member
anonymous
Join Date: Dec 2018
Posts: 4
Rep Power: 8 |
Thanks for your reply and sorry for my late answer.
I tried your proposal and checked the mass flow rate at the inlet and outlet of the fan. In consideration of the conservation of mass the mass flow at the inlet and outlet has to be the same. With your proposal I get different mass flow rates. I think the inlet and outlet boundary conditions both consider the fan curve, but they are not connected to each other. I was thinking about using the coded fixed value to fix this Problem. Do you think this is a possibility? |
|
January 19, 2019, 00:23 |
|
#6 |
Member
Kirk Jarvis
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
I constructed a radial face with snappyHexMesh and use the fan cyclic boundary condition which follows the curve. SNH makes faceZones which can be converted to cyclic patches with createBaffles. Worked well with pimple foam should be able to control the flow of the fan with the pressure in room.
snappyHexMeshDict Code:
*--------------------------------*- C++ -*----------------------------------*\ | o | | | o o | HELYX-OS | | o O o | Version: v2.4.0 | | o o | Web: http://www.engys.com | | o | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location system; object snappyHexMeshDict; } castellatedMesh true; snap true; addLayers false; geometry { /* wall_fan.stl { type triSurfaceMesh; regions { fan { name fan;} outlet { name outlet; } owalls { name owalls; } inlet { name inlet; } rwalls { name rwalls; } } } */ fanIn.stl { type triSurfaceMesh; name fanInSTL; } fanOut.stl { type triSurfaceMesh; name fanOutSTL; } rwall0.stl { type triSurfaceMesh; name rwall0STL; } rwall1.stl { type triSurfaceMesh; name rwall1STL; } bwall.stl { type triSurfaceMesh; name bwallSTL; } inletWall.stl { type triSurfaceMesh; name inletwallSTL; } /* refinementCylinder //USER DEFINED REGION NAME { type searchableCylinder; point1 (0.8535 0 0); // Height point2 (0.9535 0 0); // Vector radius 1; } refinementCylinder1 //USER DEFINED REGION NAME { type searchableCylinder; point1 (0.8785 0 0); // Height point2 (0.9285 0 0); // Vector radius 1; } */ }; castellatedMeshControls { features ( { file "fan.eMesh"; levels ((1 3)); } ); refinementSurfaces { fanInSTL { level (1 3); faceZone fanInZone; } rwall0STL { level (1 3); faceZone rwall0Zone; faceType baffle; } rwall1STL { level (1 3); faceZone rwall1Zone; faceType baffle; } fanOutSTL { level (1 3); faceZone fanSTL; } bwallSTL { level (1 3); patchInfo {type wall; } } inletwallSTL { level (1 3); faceZone inletWallZone; faceType baffle; } /* wall_fan.stl { level ( 0 0 ); regions { outlet { level (2 2); faceZone outletZone; } rwalls { level (2 2); faceZone rwallsZone; faceType baffle;} owalls { level (2 2); patchInfo {type wall; }} inlet { level (2 2); faceZone inletZone; } fan { level (2 2); faceZone fanZone; } //inlet { level (2 2); patchInfo {type patch; }} } } */ } refinementRegions { /* fanInletSTL { levels ((0.01 3) (0.05 2)); mode distance; } fanOutletSTL { levels ((0.01 3) (0.05 2)); mode distance; } */ } locationInMesh ( 0.1 0 0.1 ); maxLocalCells 25000000; maxGlobalCells 50000000; minRefinementCells 0; nCellsBetweenLevels 3; resolveFeatureAngle 30; allowFreeStandingZoneFaces true; planarAngle 30; maxLoadUnbalance 0.10; } snapControls { nSolveIter 100;//30; nSmoothPatch 5;//3; tolerance 5.0;//2.0; nRelaxIter 8;//5; nFeatureSnapIter 30;//30; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { layers { fan_outlet { nSurfaceLayers 3; expansionRatio 1.1; finalLayerThickness 0.4; minThickness 0.001;//0.04; } /* fan_inlet { nSurfaceLayers 2; expansionRatio 1.1; finalLayerThickness 0.4; minThickness 0.001;//0.04; } */ } relativeSizes true; expansionRatio 1.1; finalLayerThickness 0.4; minThickness 0.04; nGrow 0; featureAngle 180;//130; ok w/ 60 slipFeatureAngle 75;//30; nSmoothSurfaceNormals 3;//1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.25;//0.5; maxThicknessToMedialRatio 0.3;//0.3; minMedialAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 50; nRelaxIter 20; //5; writeVTK false; noErrors false; layerRecovery 1; growZoneLayers false; projectGrownUp 0.0; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1.00E-13; minTetQuality 1e-13;//1e-15; minArea -1; minTwist 0.05;//0.02; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; relaxed { maxNonOrtho 75; } } debug 0; mergeTolerance 1E-6; autoBlockMesh false; Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1806 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object createBafflesDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Whether to convert internal faces only (so leave boundary faces intact). // This is only relevant if your face selection type can pick up boundary // faces. internalFacesOnly true; // Baffles to create. baffles { //- Use predefined faceZone to select faces and orientation. cyclicFaces { //- Select faces and orientation through a searchableSurface type faceZone; zoneName fanSTL; flip false; patches { master { //- Master side patch name fan_half0; type cyclic; neighbourPatch fan_half1; } slave { //- Slave side patch name fan_half1; type cyclic; neighbourPatch fan_half0; } } } } // ************************************************************************* // createPatchDict Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1806 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object createPatchDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // This application/dictionary controls: // - optional: create new patches from boundary faces (either given as // a set of patches or as a faceSet) // - always: order faces on coupled patches such that they are opposite. This // is done for all coupled faces, not just for any patches created. // - optional: synchronise points on coupled patches. // - always: remove zero-sized (non-coupled) patches (that were not added) // 1. Create cyclic: // - specify where the faces should come from // - specify the type of cyclic. If a rotational specify the rotationAxis // and centre to make matching easier // - always create both halves in one invocation with correct 'neighbourPatch' // setting. // - optionally pointSync true to guarantee points to line up. // 2. Correct incorrect cyclic: // This will usually fail upon loading: // "face 0 area does not match neighbour 2 by 0.0100005%" // " -- possible face ordering problem." // - in polyMesh/boundary file: // - loosen matchTolerance of all cyclics to get case to load // - or change patch type from 'cyclic' to 'patch' // and regenerate cyclic as above // Do a synchronisation of coupled points after creation of any patches. // Note: this does not work with points that are on multiple coupled patches // with transformations (i.e. cyclics). pointSync false; // Patches to create. patches ( { // Name of new patch name walls; // Dictionary to construct new patch from patchInfo { type patch; //neighbourPatch fan_half1; // Optional: explicitly set transformation tensor. // Used when matching and synchronising points. //transform rotational; //rotationAxis (1 0 0); //rotationCentre (0 0 0); // transform translational; // separationVector (1 0 0); // Optional non-default tolerance to be able to define cyclics // on bad meshes //matchTolerance 1E-2; } // How to construct: either from 'patches' or 'set' constructFrom patches; // If constructFrom = patches : names of patches. Wildcards allowed. patches (".*wall.*"); // If constructFrom = set : name of faceSet //set f0; } ); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1806 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { #includeEtc "caseDicts/setConstraintTypes" walls { type noSlip; } fan_half0 { type cyclic; } fan_half1 { type cyclic; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1806 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { #includeEtc "caseDicts/setConstraintTypes" walls { type zeroGradient; } fan_half0 { type fan; patchType cyclic; jump uniform 0; value uniform 0; jumpTable tableFile; jumpTableCoeffs { file "<constant>/FluxVsdP.dat"; outOfBounds clamp; // optional out-of-bounds handling interpolationScheme linear; } //1((1000 0)); } fan_half1 { type fan; patchType cyclic; value uniform 0; } } // ************************************************************************* // Last edited by kcjarvis56; January 19, 2019 at 00:26. Reason: add thumbnails |
|
July 30, 2020, 09:38 |
|
#7 |
New Member
Mohammadreza Abyanaki
Join Date: Jan 2011
Posts: 5
Rep Power: 15 |
Hey Kirk,
I don't fully understand the boundaries you have defined (for example where exactly fan_half0 and fan_half1 are located and how they are related to the InletFaceZone and RadialPatch you have shown in the picture). If inlet and outlet of the fan are defined as cyclic then, as far as I know, they must have the exact same geometry and it is not possible if one is a circle and the other one is a ring. Would you please share your case or elaborate on the boundaries? Cheers |
|
October 23, 2020, 01:09 |
|
#8 |
New Member
Robert Crane
Join Date: Jul 2020
Posts: 8
Rep Power: 6 |
mra-cfd, I too am a bit confused by the boundary conditions used by Kirk. Did you figure this out? I am working on a similar problem.
|
|
October 23, 2020, 10:48 |
|
#9 |
New Member
Mohammadreza Abyanaki
Join Date: Jan 2011
Posts: 5
Rep Power: 15 |
||
Tags |
fan boundary condition, fan curve |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fan curve table | totocros | STAR-CCM+ | 3 | September 22, 2015 09:47 |
Fan Curve Model with CHT simulation | mariconeagles96 | CFX | 5 | April 22, 2015 02:31 |
flow simulation across a small fan | jane luo | Main CFD Forum | 15 | April 12, 2004 18:49 |
Radial Fan Outlet measurements | Paal | Main CFD Forum | 3 | August 5, 2002 06:12 |
CFD v Experiment for Radial Fan | Alan Davis | Main CFD Forum | 7 | April 24, 2001 13:15 |