CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   question about gravity (http://www.cfd-online.com/Forums/openfoam/66343-question-about-gravity.html)

vivien July 13, 2009 05:18

question about gravity
 
Hi, everybody,

I would like to simulate the contrast agent transport in blood flow in human vessel. Currently contrast agent is assumed to be a passive scalar transported by blood. So I use icoFoam coupled with caFoam in this way:
#include "fvCFD.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "createFields.H"
# include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
for (runTime++; !runTime.end(); runTime++)
{
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readPISOControls.H"
# include "CourantNo.H"
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);
solve(UEqn == -fvc::grad(p));
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
phi = (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, U, phi);
adjustPhi(phi, U, p);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rUA, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
# include "continuityErrs.H"
U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
}
// part added : copied from scalarTransportFoam.C
// beginning of the added part #####################################
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
solve
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT, T)
);
}
// end of the added part ###########################################
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return(0);
}

However, we had observed some settings of CA at the bottom of vessel wall due to gravity. Does anybody have ideas how can I include gravity term into the solver for such case? should I solve for 2-phase flow(as I think it may due to the slightly different density of blood and CA which reult in the settings of CA)?

Thanks!!!

vivien

vivien July 13, 2009 08:50

Can anybody give me suggestions?

Thanks in advance!

Vivien

henrik July 13, 2009 09:14

Dear Vivien,

settlingFoam might be a good starting point for you since the separation occurs due to a difference in density between the CA and the background fluid.

Henrik

vivien July 13, 2009 10:00

Hi, Henrik,

Thanks for your reply. Maybe I can start to solve my problem step by step...because CA is always injected through a catheter into the vessel and then mixed with blood, do you think if I can still use icoFoam+passivescalartransport (as I posted at first)to solve the problem if CA here is assumed again to have the same density as blood(the geometry will be similar as a Y, 2 inlet2, 1 outlet, the CA and the blood will be mixed at bifurcation). My aim is to first simulate uniform mixing of 2 flow (same property, but different inlets, one inlet with CA). My idea is to give time varing velocity (because blood flow is pulsatile )for vessel inlet, and give fixed velocity to the catheter+ passivescalar transport. Do you think it is the correct way to implement?

Thanks!!

Vivien


All times are GMT -4. The time now is 15:03.