- **OpenFOAM**
(*http://www.cfd-online.com/Forums/openfoam/*)

- - **Is div(grad(U))=laplacian(U) ???**
(*http://www.cfd-online.com/Forums/openfoam/107701-div-grad-u-laplacian-u.html*)

Is div(grad(U))=laplacian(U) ???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 |

Hi
I think you see instability because you use a non-conservative form. |

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 |

Hi
May using lower relaxations be helpful. |

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. |

Hi
Would you please tell me what relaxation factors you used? |

hi Ata,
I have taken relaxation factor as 0.2. But still it is coming the same Thanks Regards Mallikarjuna |

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? |

Hi Ata,
My solver is steady state. I have taken relaxation factors as for p=0.2,U=0.07. Thanks Regards Mallikarjuna |

Hi
What is your solver? Could you try both of relaxation factors 0.01? |

1 Attachment(s)
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 |

Hi
Is it possible to write your solver in a conservative form? Did you try both of relaxation factors 0.01? |

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 |

Hi
Could you first calculate the viscosity and then use fvm::laplacian(nu, U) in your code? |

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 |

Ho
For start they are good. What did you got using these? |

Hi Ata,
when i run my case by using modified icoFoam solver, it is running some iterations giving some error as follows. Time = 0.145Error:-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::printStack(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 |

Hi
How much is your max. Courant number? |

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 |

Hi
Decrease your delta T. |

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