Problems to implement a coordinate change
I'm trying to implement a "coordinate contraction", and I got many problems (I'm newbie in OpenFOAM).
My mesh is a very long tube, so what I wanna do is implement a coordinate change to "compress" the axial coordinate, so that the aspect ratio gets better. I'm trying to do this in nonNewtonianIcoFoam.
Mathematically, what I must do is pre-multiply (innerly) the operators div, grad, and so on, in the equations, by an anisotropic tensor that shrinks the axial dimension. But I don't know how to do this in OpenFOAM.
I tryed to simply define the tensors and multiply them, but the operators (+, - and ==) didn't accept to operate a fvm::div(phi,U) class with a tensor class, and so on.
How can I do this (insert a tensor pre-multiplying all the "\nabla"s)? Help, please.
The dimensions and shape (sparsity) of the Foam::fvm::fvMatrix will depend on the mesh + discretisation scheme used + linear combination and type of operators in the equation, and it will not be a tensor definitely, so multiplication with a tensor (a direct one) is out of the question... just my 2 cents...
Why not just make a better mesh? :)
My point is to make a coordinate transformation, not just make a better mesh. It's not just to run better, but to make it easy to visualise as well.
But I don't know if I understood. I know the Foam::fvm::fvMatrix isn't a tensor.
What I wanna do (mathmatically) is multiply the div(UU), grad(p), laplacian(nu,U), etc, by a tensor that performs the coordinate change. But I don't know how to implement this in OpenFOAM. I noticed that I can't just multiply the objects fvm::div(phi,U), fvc::grad(p), etc. But so how can I program to solve the equation:
dU/dt + A & div(UU) - A & A & laplacian(nu,U) = - A & grad(p)
where A is a tensor?
Thanks for the reply!
again: fvm::fvMatrix has not just geometrical information of the mesh but all other information related to the solution variable coefficients of the discretized (non)linear algebraic system.
Ask yourself this:
How am I to discretize the
\int_V_P A & div(UU) dv
using a Gauss divergence theorem when A is a tensor? Is this possible at all?
I personally believe that this is not possible at all within the finite volume framework, as explained for example in many theses related to FVM on arbitrary unstructured meshes, all of which you can find here:
If you prove this to be wrong, please post the result, I'm always happy to learn new stuff. :D
|All times are GMT -4. The time now is 22:14.|