
[Sponsors] 
September 21, 2011, 21:04 
Problems to implement a coordinate change

#1 
New Member
Mateus Palharini Schwalbert
Join Date: May 2011
Posts: 13
Rep Power: 6 
Hello.
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 premultiply (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 premultiplying all the "\nabla"s)? Help, please. 

September 22, 2011, 03:08 

#2  
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 259
Blog Entries: 5
Rep Power: 11 
Quote:
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? Tomislav 

September 22, 2011, 05:16 

#3 
New Member
Mateus Palharini Schwalbert
Join Date: May 2011
Posts: 13
Rep Power: 6 
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! 

September 22, 2011, 13:20 

#4  
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 259
Blog Entries: 5
Rep Power: 11 
Hi,
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: http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/docs/ If you prove this to be wrong, please post the result, I'm always happy to learn new stuff. Tomislav Quote:
Last edited by tomislav_maric; September 22, 2011 at 13:22. Reason: grammar 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
cylindrical coordinate vs cartesian coordinate  Lam  FLUENT  10  May 11, 2013 13:05 
CFD Software with Cylindrical and Spherical Coordinate  cfd2010  Main CFD Forum  0  June 9, 2010 21:55 
no enthalpy change across the momentum source  Atit Koonsrisuk  CFX  2  December 19, 2005 03:33 
Multicomponent fluid  Andrea  CFX  2  October 11, 2004 05:12 
liquid/solide phase change problems  mehdi fteity  Main CFD Forum  3  September 14, 2000 21:44 