CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Is div(grad(U))=laplacian(U) ???

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2012, 09:00
Default Is div(grad(U))=laplacian(U) ???
  #1
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
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
mmkr825 is offline   Reply With Quote

Old   October 6, 2012, 07:51
Default
  #2
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
I think you see instability because you use a non-conservative form.
ata is offline   Reply With Quote

Old   October 7, 2012, 02:39
Default
  #3
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
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
mmkr825 is offline   Reply With Quote

Old   October 7, 2012, 06:02
Default
  #4
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
May using lower relaxations be helpful.
ata is offline   Reply With Quote

Old   October 7, 2012, 07:41
Default
  #5
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
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.
mmkr825 is offline   Reply With Quote

Old   October 7, 2012, 08:14
Default
  #6
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
Would you please tell me what relaxation factors you used?
ata is offline   Reply With Quote

Old   October 7, 2012, 09:02
Default
  #7
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
hi Ata,
I have taken relaxation factor as 0.2. But still it is coming the same

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   October 7, 2012, 09:29
Default
  #8
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
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?
ata is offline   Reply With Quote

Old   October 8, 2012, 02:07
Default
  #9
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
Hi Ata,
My solver is steady state. I have taken relaxation factors as for p=0.2,U=0.07.

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   October 8, 2012, 06:08
Default
  #10
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
What is your solver?
Could you try both of relaxation factors 0.01?
ata is offline   Reply With Quote

Old   October 8, 2012, 07:08
Default
  #11
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
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
Attached Files
File Type: gz sbmFoam.tar.gz (2.9 KB, 8 views)
mmkr825 is offline   Reply With Quote

Old   October 9, 2012, 07:45
Default
  #12
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
Is it possible to write your solver in a conservative form?
Did you try both of relaxation factors 0.01?
ata is offline   Reply With Quote

Old   October 9, 2012, 07:57
Default
  #13
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
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
mmkr825 is offline   Reply With Quote

Old   October 9, 2012, 08:14
Default
  #14
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
Could you first calculate the viscosity and then use fvm::laplacian(nu, U) in your code?
ata is offline   Reply With Quote

Old   October 10, 2012, 03:32
Default
  #15
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
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
mmkr825 is offline   Reply With Quote

Old   October 10, 2012, 06:23
Default
  #16
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Ho
For start they are good. What did you got using these?
ata is offline   Reply With Quote

Old   October 10, 2012, 06:32
Default
  #17
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
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
mmkr825 is offline   Reply With Quote

Old   October 10, 2012, 06:45
Default
  #18
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
How much is your max. Courant number?
ata is offline   Reply With Quote

Old   October 10, 2012, 06:52
Default
  #19
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14
mmkr825 is on a distinguished road
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
mmkr825 is offline   Reply With Quote

Old   October 10, 2012, 09:15
Default
  #20
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
Decrease your delta T.
ata is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 00:01.