|
[Sponsors] |
Difference between grad and div on boundaries? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 8, 2022, 09:28 |
Difference between grad and div on boundaries?
|
#1 |
Member
Torsten Schenkel
Join Date: Jan 2014
Posts: 69
Rep Power: 12 |
Hi,
I am trying to implement a source term for a transport equation (shear stress driven particle migration). The original term is implemented using fvc::laplacian, but I need to move to an anisotropic model (multiply with a nonisotropic diagonal matrix). I have implemented the following: sourceCorig = fvc::laplacian(linKc*Kc*sqr(a)*H, H*gammaDot); sourceCHgamma = fvc::div(linKc*Kc*sqr(a)*H*fvc::grad(H*gammaDot)); sourceCHgammaZ = fvc::div(linKc*Kc*sqr(a)*H*fvc::div(H*gammaDot*Z)) ; where Z is for the moment the identity matrix. If my maths is right, these should all be identical. However, while there are some discrepencies between laplacian() and div(grad()), the div(div( *I) does not behave at the wall (right side in the graph). Am I missing something here? Do I need to treat the wall separately? |
|
August 22, 2022, 14:07 |
|
#2 |
Senior Member
René Thibault
Join Date: Dec 2019
Location: Canada
Posts: 114
Rep Power: 6 |
||
August 24, 2022, 04:55 |
|
#3 | |
Member
Torsten Schenkel
Join Date: Jan 2014
Posts: 69
Rep Power: 12 |
Quote:
Thanks. I'll need to look into that. But it seems to be something different (to do with BCs?). |
||
August 24, 2022, 08:26 |
|
#4 |
Senior Member
René Thibault
Join Date: Dec 2019
Location: Canada
Posts: 114
Rep Power: 6 |
Because you use the Laplacian and grad in the calculation of the BC, I just pointed this thing out in case that could may affect the results....
I didn't want to lead you toward something that could waste your energy in the wrong path.... It's really subtle and people using openfoam may be surprised when they find out about this information. Good luck with your work! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
upwind scheme for grad and div | Yujuan | OpenFOAM Running, Solving & CFD | 0 | June 26, 2020 04:55 |
A simple question about adding Div and Grad of a source term to the momentum equation | adkar | Main CFD Forum | 5 | May 23, 2016 17:31 |
Numerical schemes for grad and div | Tobi | OpenFOAM | 6 | March 11, 2013 21:24 |
calclulate div and grad just on specified cells -Local Time stepping | mm.abdollahzadeh | OpenFOAM Programming & Development | 0 | January 25, 2013 06:32 |
Possible Incompressible Turbulence Model Bugs | gocarts | OpenFOAM Bugs | 12 | November 26, 2009 14:58 |