Constructing Surface Interpolation Scheme from Divergence Scheme Information
Good morning,
I have a small problem, which I have not been able to solve so far. Background: I am going to perform different operations on a small grid (say 1400 cells): 1. Evaluating the divergence of some field, i.e fvc::div(phi,T) 2. Building the fvScalarMatrix for the same, i.e. fvm::div(phi,T) The thing is that I am going to perform these two operations approximately 90,000 times per time step/iteration, so there is room for thinking in optimising and utilising prior knowledge of the system. The prior knowledge is that half of the faces (fixed in time and identical for all grids) have a zero flux, why the construction of fvm::div and fvc::div can probably be reduced by a factor of 2. This reduction approximately corresponds to 15% of the execution time, so it is worthwhile to spend some time on it. Problem: I would still like to utilise the numerical scheme selection in fvSchemes, i.e. the user should merely give e.g. Code:
div(phi,T) Gauss upwind phi; So far I have managed to get the divergence scheme information from the fvSchemes by using Code:
ITstream& ss = mesh.divScheme("div(phi,T)"); Code:
tmp<surfaceInterpolationScheme<scalar> > surfaceInterpolationScheme::New(const fvMesh& mesh, Istream& schemeData); Code:
ITstream ss Code:
Istream schemeData Kind regards, Niels |
Good evening all,
I have found the solution, and it is rather simple: Code:
Istream& is = mesh.divSchemes("div(phi,T)"); Kind regards Niels |
Hi Niels,
I have the same problem to construct limitedSurfaceInterpolationScheme class and have already been stuck to it for two three days. The Gauss token in the itstream drives me nuts. Your solution works finally! Many thanks!!!! best regards Jun |
All times are GMT -4. The time now is 19:58. |