|
[Sponsors] |
October 4, 2012, 09:00 |
Is div(grad(U))=laplacian(U) ???
|
#1 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Everyone,
I have a doubt about div() and laplacian(). For the general case in all solvers we written gamma*div(grad(U))=laplacian(gamma, U). But when i checked by replacing fvc::laplacian(gamma, U) =gamma*fvc::div(fvc::grad(U)) for the icoFoam solver, the solution is diverging (Courant Number going to high value). Anyone please clarify my doubt. Thanks Regards Mallikarjuna |
|
October 6, 2012, 07:51 |
|
#2 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
I think you see instability because you use a non-conservative form. |
|
October 7, 2012, 02:39 |
|
#3 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Ata,
Thanks very much quick reply. You are correct, i am getting instability. could you please suggest me to rectify this problem. I need to use div(gradU+gradU.T()) in my problem. Thanks Regards Mallikarjuna |
|
October 7, 2012, 06:02 |
|
#4 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
May using lower relaxations be helpful. |
|
October 7, 2012, 07:41 |
|
#5 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Ata,
Thanks for your reply. I tried with low relaxation factor but it is not working. Is there any other method to solve this problem? If it is there please guide me Thanks Regards Mallikarjuna. |
|
October 7, 2012, 08:14 |
|
#6 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
Would you please tell me what relaxation factors you used? |
|
October 7, 2012, 09:02 |
|
#7 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
hi Ata,
I have taken relaxation factor as 0.2. But still it is coming the same Thanks Regards Mallikarjuna |
|
October 7, 2012, 09:29 |
|
#8 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
Is the problem unsteady state? If yes how much is your time step and max courant number? You used 0.2 for all equations? |
|
October 8, 2012, 02:07 |
|
#9 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Ata,
My solver is steady state. I have taken relaxation factors as for p=0.2,U=0.07. Thanks Regards Mallikarjuna |
|
October 8, 2012, 06:08 |
|
#10 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
What is your solver? Could you try both of relaxation factors 0.01? |
|
October 8, 2012, 07:08 |
|
#11 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Ata,
I developed my own solver for predicting velocity profile(U) and particle concentration profile(T) for suspension flow (fluid+particles). And in my momentum equation, the viscosity is not constant, it is function of particle volume fraction(T). I am attaching my solver. Thanks Regards Mallikarjuna |
|
October 9, 2012, 07:45 |
|
#12 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
Is it possible to write your solver in a conservative form? Did you try both of relaxation factors 0.01? |
|
October 9, 2012, 07:57 |
|
#13 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Ata,
I tried for both of relaxation factors 0.01. I think my solver is in non conservative form. At First i tried for icoFoam solver by replacing laplacian (nu, U) by nu*fvc::div(fvc::grad(U)). And i tried another method where laplacian(U)=div(faceFluxes). Code:- surfaceVectorField surfNormalGradDU = fvc::snGrad(U); surfaceVectorField n = mesh.Sf()/mesh.magSf(); surfaceTensorField surfGradDU=(n*surfNormalGradDU) + ((I-n*n)&(fvc::interpolate(fvc::grad(U)))); fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - nu*fvc::div(mesh.magSf()*(surfGradDU&n)) ); But i am getting the divergence problem. Thanks Regards Mallikarjuna |
|
October 9, 2012, 08:14 |
|
#14 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
Could you first calculate the viscosity and then use fvm::laplacian(nu, U) in your code? |
|
October 10, 2012, 03:32 |
|
#15 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Ata,
I tried for the icoFoam solver and for cavity case. I taken relaxation factors as you suggested 0.01 for both p and U. Here nu is constant. And i used gauss linear for div() and Gauss linear corrected for laplacian(). Should i change these schemes to other schemes? Thanks Regards Mallikarjuna |
|
October 10, 2012, 06:23 |
|
#16 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Ho
For start they are good. What did you got using these? |
|
October 10, 2012, 06:32 |
|
#17 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Ata,
when i run my case by using modified icoFoam solver, it is running some iterations giving some error as follows. Error:- Time = 0.145 Courant Number mean: 7.93942e+94 max: 1.42329e+96 DILUPBiCG: Solving for Ux, Initial residual = 0.999994, Final residual = 0.980212, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 1.46608, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 0.0270296, No Iterations 1001 time step continuity errors : sum local = 6.53592e+99, global = -4.90912e+83, cumulative = -4.90911e+83 #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #4 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libfiniteVolume.so" #5 in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/testIcoFoam" #6 in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/testIcoFoam" #7 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" #8 in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/testIcoFoam" Floating point exception i have checked the solution in paraView, the results are out of expectations. Thanks Regards Mallikarjuna |
|
October 10, 2012, 06:45 |
|
#18 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
How much is your max. Courant number? |
|
October 10, 2012, 06:52 |
|
#19 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Ata,
At the last iteration it is max: 1.42329e+96. And my delta t is 0.005. At first iteration courant no < 1. But it is gradually increasing. Thanks Regards Mallikarjuna |
|
October 10, 2012, 09:15 |
|
#20 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
Decrease your delta T. |
|
|
|