|
[Sponsors] |
November 13, 2019, 08:42 |
Velocity inlet boundary condition
|
#1 |
New Member
Fantastic Boy
Join Date: Oct 2017
Posts: 12
Rep Power: 9 |
Hi all,
I am simulating the combustion inside a turbine. I got the mass flow rate of the fuel and air. I set the massflowrate boundary condition using flowRateInletVelocity. However, I also wanted to set the radial, axial and tangential components for the velocity. Is there any boundary condition can do that? I have looked into swirlFlowInletVelocity, swirlInletVelocity and cylindricalInletVelocity, but I not sure which 1 is suitable for me because I do not have the value for the RPM. Thank you for you help. |
|
November 20, 2019, 06:04 |
|
#2 |
Member
Arthur
Join Date: Aug 2014
Location: Italy
Posts: 47
Rep Power: 12 |
Yes u can do it.
The way I report may be not very elegant. In this example I know the polynomial function for the velocity field in the cylindrical coordinates system. Once the radial, axial and tangential velocity field was calculated in cylindrical coordinates the script transform the velocity vector in x,y,z cartesian field. Be careful with this last transformation which depends on how is rotated cylindrical system respect to cartesian coordinates system. The BC is stationary. Inlet { type fixedValue; value #codeStream { codeInclude #{ #include "fvCFD.H" #}; codeOptions #{ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude #}; codeLibs #{ -lmeshTools \ -lfiniteVolume #}; code #{ const IOdictionary& d = static_cast<const IOdictionary&> ( dict.parent().parent() ); const fvMesh& mesh = refCast<const fvMesh>(d.db()); const label id = mesh.boundary().findPatchID("Inlet"); const fvPatch& patch = mesh.boundary()[id]; vectorField U(patch.size(), vector(0, 0, 0)); const scalar pi = constant::mathematical:i; const scalar axia_A = 1.41367332956092e-10;//coeff of polynomial function const scalar axia_B = -4.18418721719881e-08; const scalar axia_C = 4.91363590703797e-06; const scalar axia_D = -0.000288677283485151; const scalar axia_E = 0.00866669227298041; const scalar axia_F = -0.114711359540873; const scalar axia_G = 0.292349859167141; const scalar axia_H = -0.768115842744353; const scalar tan_A = -2.71884009032384e-10; const scalar tan_B = 8.37743463345575e-08; const scalar tan_C = -1.03086229728854e-05; const scalar tan_D = 0.000643842539307165; const scalar tan_E = -0.0214317483671554; const scalar tan_F = 0.364042844487087; const scalar tan_G = -2.70836613632716; const scalar tan_H = 26.2627437487531; const scalar rad_A = 2.39189261322610e-10; const scalar rad_B = -7.37250730211115e-08; const scalar rad_C = 9.45074247557638e-06; const scalar rad_D = -0.000651689943666313; const scalar rad_E = 0.0257433809501291; const scalar rad_F = -0.553031981712577; const scalar rad_G = 4.82541486773058; const scalar rad_H = 7.52321045811518; const scalar radius = 97.5;//radius expressed in mm const scalar PIgr = 3.14159; forAll(U, i) //equivalent to for (int i=0; patch.size()<i; i++) { const scalar xmm = patch.Cf()[i][0];//it considers the mesh value in m const scalar x = xmm*1000+97.5;//it transforms the coordinates from m to mm since the mesh is in meters but the polynomial function consider mm const scalar ymm = patch.Cf()[i][1]; const scalar y = 80-ymm*1000; //translation of the coordinate system const scalar zmm = patch.Cf()[i][2]; const scalar z = zmm*1000; const scalar axial = axia_A*(pow(y,7))+axia_B*(pow(y,6))+axia_C*(pow(y, 5))+axia_D*(pow(y,4))+axia_E*(pow(y,3))+axia_F*(po w(y,2))+axia_G*(pow(y,1))+axia_H;//polynomial function const scalar rad = rad_A*(pow(y,7))+rad_B*(pow(y,6))+rad_C*(pow(y,5)) +rad_D*(pow(y,4))+rad_E*(pow(y,3))+rad_F*(pow(y,2) )+rad_G*(pow(y,1))+rad_H; const scalar tan = tan_A*(pow(y,7))+tan_B*(pow(y,6))+tan_C*(pow(y,5)) +tan_D*(pow(y,4))+tan_E*(pow(y,3))+tan_F*(pow(y,2) )+tan_G*(pow(y,1))+tan_H; U[i] = vector((rad*x - tan*z)/radius ,axial, (rad*z + tan*x)/radius);//From cylindrical to cartesian frame } U.writeEntry("", os); #}; }; } |
|
Tags |
inlet bc |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unsteady Inlet Velocity Boundary Condition | rocketeer | Fluent UDF and Scheme Programming | 1 | October 4, 2018 13:31 |
Outlet temperature to temperature boundary condition of velocity inlet. (UDF) | dillon | Fluent UDF and Scheme Programming | 3 | March 25, 2018 12:06 |
UDF: Change boundary condition. Velocity inlet to pressure inlet at time "t" | jpina | FLUENT | 10 | April 11, 2015 15:19 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
Velocity inlet boundary condition for porous medium | Chander | CFX | 3 | March 11, 2012 22:18 |