|
[Sponsors] |
May 4, 2010, 05:23 |
Viscous Force Calculation
|
#1 |
Member
John Wang
Join Date: Mar 2009
Location: Singapore
Posts: 73
Rep Power: 17 |
Hi guys,
I'm trying to implement a force-balance type subroutine into the pimpleDyMFoam solver based on the code from forces.C. I am having trouble with the calculation of the viscous force, though, as the forces.C uses the following code for the viscous force: Code:
00438 const volVectorField& U = obr_.lookupObject<volVectorField>(UName_); 00439 const volScalarField& p = obr_.lookupObject<volScalarField>(pName_); 00440 00441 const fvMesh& mesh = U.mesh(); 00442 00443 const surfaceVectorField::GeometricBoundaryField& Sfb = 00444 mesh.Sf().boundaryField(); 00445 00446 tmp<volSymmTensorField> tdevRhoReff = devRhoReff(); 00447 const volSymmTensorField::GeometricBoundaryField& devRhoReffb 00448 = tdevRhoReff().boundaryField(); 00449 00450 forAllConstIter(labelHashSet, patchSet_, iter) 00451 { 00452 label patchi = iter.key(); 00453 00454 vectorField Md = mesh.C().boundaryField()[patchi] - CofR_; 00455 00456 vectorField pf = Sfb[patchi]*p.boundaryField()[patchi]; 00457 00458 fm.first().first() += rho(p)*sum(pf); 00459 fm.second().first() += rho(p)*sum(Md ^ pf); 00460 00461 vectorField vf = Sfb[patchi] & devRhoReffb[patchi]; 00462 00463 fm.first().second() += sum(vf); 00464 fm.second().second() += sum(Md ^ vf); 00465 } Code:
00059 else if (obr_.foundObject<incompressible::RASModel>("RASProperties")) 00060 { 00061 const incompressible::RASModel& ras 00062 = obr_.lookupObject<incompressible::RASModel>("RASProperties"); 00063 00064 return rho()*ras.devReff(); 00065 } John |
|
May 4, 2010, 05:59 |
|
#2 |
Member
John Wang
Join Date: Mar 2009
Location: Singapore
Posts: 73
Rep Power: 17 |
Solved... I must have been more sleep deprived than I thought I am...
Anyway, defining the devRhoReff() using rhoInf*turbulence->devReff() did the trick. John |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how does Fluent calculate the pressure and viscous force vector? | Ralf Schmidt | FLUENT | 2 | May 17, 2010 16:49 |
Viscous force | enry | Fluent UDF and Scheme Programming | 1 | November 15, 2009 11:53 |
Forces viscous calculation in VWT with OpenFOAM 15x | terrybarnaby | OpenFOAM Running, Solving & CFD | 0 | November 28, 2008 09:39 |
pressure force and viscous force | CFD | FLUENT | 0 | March 7, 2006 02:03 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |