Hello,
You can try to first interpolate to the faces and then avarage over the faces of the cell. The code would look like this: Code:
|
You can solve diffusion equation in pseudo-time, like that:
dimensionedScalar pseudoDeltaT ("dT", dimTime, 1.0); dimensionedScalar Dphi ("Dphi", dimLength*dimLength/dimTime, 1.0); solve ( fvm::Sp(1.0/pseudoDeltaT, Phi) - fvc::Sp(1.0/pseudoDeltaT, Phi) - fvm::laplacian(Dphi, Phi) ); |
What's the purpose of
fvm::Sp(1.0/pseudoDeltaT, Phi) - fvc::Sp(1.0/pseudoDeltaT, Phi) Numerical stability of the equations? |
Quote:
If you use diffusion equation w/o temporal term, then your Phi distribution will be smoothed across a whole domain. But with adjustment of ratio between "pseudoDeltaT" and Dphi you can tune how many cells around initial field will be affected during one pseudo iteration. |
That's interesting. Can you recommend someone regarding about the method?
|
This is a simple idea, which arises from the concept of numerical diffusion of convection equation.
http://www.mathematik.tu-dortmund.de.../Transport.pdf Or just walk around this personal page: http://www.mathematik.tu-dortmund.de/~kuzmin/ |
Quote:
I used code from the CFDEMcoupling library to do something similar. You can copy the function from this GitHub repository. There are some user-defined lengths and lower/upper limits you can use to tune the diffusion. |
All times are GMT -4. The time now is 05:47. |