Possibility of local mechanical turbulence implementation

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

 March 12, 2013, 19:23 Possibility of local mechanical turbulence implementation #1 Member   Join Date: Aug 2012 Posts: 74 Rep Power: 4 Hi, Is there any possibility to add turbulent kinetic energy source term, k, for only specific part of any domain different from the turbulent kinetic energy value of the rest of the domain? == 1 == Turbulent kinetic energy equation in kOmegaSST model of OpenFOAM 2.1.1 under kOmegaSST.C: Code: ``` // Turbulent kinetic energy equation tmp kEqn ( fvm::ddt(k_) + fvm::div(phi_, k_) - fvm::Sp(fvc::div(phi_), k_) - fvm::laplacian(DkEff(F1), k_) == min(G, c1_*betaStar_*k_*omega_) - fvm::Sp(betaStar_*omega_, k_) );``` == 2 == An arbitrary specified circular region in the computational domain declaration is defined under Member functions: of kOmegaSST.C: Code: ```const scalar xo = 0; const scalar yo = 0; const scalar zmin = -205.5; const scalar zmax = -204.5; const scalar radius1 = 10; const scalar radius2 = 5; scalar addedTurbulence; // Assumed in units m^2 / s^3. forAll(mesh_.cells(),celll) { const vector& cellCenter=mesh_.C()[celll]; const scalar dx = cellCenter[0] - xo; const scalar dy = cellCenter[1] -yo; const vector r(dx, dy, 0); if ((cellCenter[2] < zmax) && (cellCenter[2] > zmin) && (mag(r) < tipRadius) && (mag(r) > hubRadius)) { addedTurbulence== 10; }else{ addedTurbulence== 1; }``` == 3 == I thought to add the addedTurbulence term would be adequate which is obviously a wrong approach: Code: ``` // Turbulent kinetic energy equation tmp kEqn ( fvm::ddt(k_) + fvm::div(phi_, k_) - fvm::Sp(fvc::div(phi_), k_) - fvm::laplacian(DkEff(F1), k_) == min(G, c1_*betaStar_*k_*omega_) - fvm::Sp(betaStar_*omega_, k_) + addedTurbulence``` == 4 == addedTurbulence must be defined as volScalarField, I appreciate that. Nevertheless, I couldn't make it work with it; therefore, I tried the above approach which considers addedTurbulence term is scalar. == 5 == Appreciate any piece of advice or suggestion. Many thanks in advance.