CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   limit high velocity values (http://www.cfd-online.com/Forums/openfoam/97386-limit-high-velocity-values.html)

 riesotto February 16, 2012 04:46

limit high velocity values

Hi all,
I have a problem with unphysical high velocity values in some areas of my simulation (rhoPorousMRFLTSPimpeFoam). The high velocities appear at the end of the rotorblades (compressible flow in a turbocharger).
The rotorblades have sharp edges, so I believe this can be the problem.

Is there a possibility to limit the velocity???

There is a possiblity of the density:
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.05;
rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0;

but this works only for rho.

kind regards
Florian

 doubtsincfd November 26, 2012 17:47

Hi. Did you find out how that can be done?

 samiam1000 November 27, 2012 10:42

How did you solve it? It could be very useful for me, too.

Thanks a lot,

Samuele

 doubtsincfd December 4, 2012 10:43

The method which works for density works for pressure as well but not for velocity. So for velocity I just looped over all cells and the boundary faces

forAll(U,cellI)
{
U[cellI].component(0)=some value;
}

forAll(U.boundaryField(),patchI)
{
forAll(U.boundaryField()[patchI],faceI)
{
U.boundaryField()[patchI][faceI].component(0)=some value;
}

}

Let me know if this works

 kwardle December 7, 2012 13:54

You might also take a look at UEqns.H in multiphaseEulerFoam. There is a velocity dampener there which might give you some idea of how better to tackle this than a brute force reassignment. Basically, what is used is a source term dampener that is controlled by a proportional coefficient defined in transportProperties.

 immortality February 11, 2013 17:26

hi Omkar
how and where i can use the expressions you mentioned?

hi kent
where in the code below you mentioned the velocity bounding has been applied?and how i can use that in sonicFoam solver?do u have any idea?
Code:

```int phasei = 0; forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) {     phaseModel& phase = iter();     const volScalarField& alpha = phase;     volVectorField& U = phase.U();     volScalarField nuEff(sgsModel->nut() + iter().nu());     UEqns.set     (         phasei,         new fvVectorMatrix         (             (scalar(1) + fluid.Cvm(phase)/phase.rho())*             (                 fvm::ddt(alpha, U)               + fvm::div(phase.phiAlpha(), U)               - fvm::Sp(fvc::ddt(alpha) + fvc::div(phase.phiAlpha()), U)             )             - fvm::laplacian(alpha*nuEff, U)             - fvc::div               (                   alpha*(nuEff*dev(T(fvc::grad(U))) /*- ((2.0/3.0)*I)*k*/),                   "div(Rc)"               )           ==             - fvm::Sp(fluid.dragCoeff(phase, dragCoeffs())/phase.rho(), U)           //- (alpha*phase.rho())*fluid.lift(phase)             + (alpha/phase.rho())*fluid.Svm(phase)         )     );     mrfZones.addCoriolis(alpha, UEqns[phasei]);     UEqns[phasei].relax();     phasei++; }```

 kwardle February 28, 2013 18:14

I am not sure where you pulled that code from, but in multiphaseEulerFoam/UEqns.H the source term is given as:
Code:

```        ==           - fvm::Sp(fluid.dragCoeff(phase, dragCoeffs())/phase.rho(), U)         //- (alpha*phase.rho())*fluid.lift(phase)           + (alpha/phase.rho())*fluid.Svm(phase)           - fvm::Sp             (                 slamDampCoeff               *max                 (                     mag(U.dimensionedInternalField()) - maxSlamVelocity,                     dimensionedScalar("U0", dimVelocity, 0)                 )               /pow(mesh.V(), 1.0/3.0),                 U             )```
The implicit dampener is given by the last term (the part in -fvm::Sp( <stuff here>)). Basically, it scales the velocity according to some max value (maxSlamVelocity) and a coefficient (slamDampCoeff)

 vitor.geraldes@ist.utl.pt July 25, 2016 14:28

I want first to thank the members of this blog for the useful numerical tricks disclosed. They were indeed helpful to me.

I started with these ideas and I managed to ensure that the velocity can not increase beyond a given threshold value by introducing an artificial hydrodynamic resistance that increases polynomially as the velocity magnitude approaches that limit.
The code is this one

forAll(Rdamp,cellI)
{

Rdamp[cellI] = Rref.value()*Foam::pow((mag(U[cellI])/maxVelocity.value()),10);
}
Rdamp.correctBoundaryConditions();
Rdamp.relax();

fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(mu, U)