|
[Sponsors] |
January 25, 2022, 05:08 |
Judge the value of div(U)
|
#1 |
New Member
Madong
Join Date: Jan 2021
Posts: 4
Rep Power: 5 |
Hi,everyone
According to the sign of div(U), I want to choose different viscosity coefficients(mu) in rhoCentralFoan. But I compiled it and found that the judgment didn't work.Please give me some advice. Thanks This is my way:add volScalarField divU and D in createFields.H,then use divU and D in rhoCentralFoam.C //add div(U) volScalarField divU ( IOobject ( "divU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), fvc::div(U) ); volScalarField D ( IOobject ( "D", runTime.timeName(), mesh ), mesh, dimensionedScalar("D", dimless, 1.0) ); // //Judge the divergence of velocity forAll(divU,totCells) { if(divU[totCells] < 0.0) { D[totCells]= 1; } else { D[totCells]= 2; } } //chose diffirent muEff volScalarField muEff("muEff", D*turbulence->muEff()); volTensorField tauMC("tauMC", muEff*dev2(Foam::T(fvc::grad(U)))); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
postProcess div(U) | jagan1mohan | OpenFOAM | 1 | July 5, 2020 05:37 |
Incompressible div(U) validation errors | steampunc | OpenFOAM Post-Processing | 5 | April 21, 2020 04:00 |
[OpenFOAM] Take derivative of mean velocity in paraFoam | hiuluom | ParaView | 13 | April 26, 2016 06:44 |
Derivative of velocity and mean velocity | hiuluom | OpenFOAM Post-Processing | 1 | May 29, 2015 23:42 |
Reducing div(U) in PIMPLE algorithm | hrushi.397 | OpenFOAM Running, Solving & CFD | 0 | April 19, 2015 05:12 |