|
[Sponsors] |
how to access each cell of a face? (user fortran) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 25, 2008, 09:57 |
how to access each cell of a face? (user fortran)
|
#1 |
Guest
Posts: n/a
|
Hello all,
I have a problem of accessing face information. (CFX11, user fortran) I am generating a general momentum source for a 3D-subdomain with user fortran. I need the normal vector components of the bottom face cells of the subdomain (each cell separately); each cell of the subdomain will use the information of the bottom face cell "below" it. I would like to use a Junction Box routine at the beginning of each iteration and store the bottom face normal vector components then for the actual user CEL routine. The code should work also in a parallel run. USER_GET_GVAR (with area_x/y/z as USER_OPER) gives the integrated normal area vector components of the whole face, right? Not each cell separately? But if it does give the information for each cell separately then how do I find the number of cells (or the NLOC)? I can't find a way to do this so if someone could help me I would be most grateful!! |
|
January 25, 2008, 12:57 |
Re: how to access each cell of a face? (user fortr
|
#2 |
Guest
Posts: n/a
|
Dear Katariina,
Not sure what you really want to do, but I would clear the following: 1 - USER_GET_GVAR is meant for G(lobal)VAR(iables, i.e. integrated, minmax, averaging operation on regions of space. Therefore, it would not be able to return an array of faces or the like. Of course, if your subdomain faces are flat the global value may help. 2 - You can access the normal vectors to a 2D region via CEL expressions, i.e Normal X, Normal Area X and so on. You could also pass these values to a UserCEL Function. 3 - The use of Junction Boxes eliminates a few utilities at your disposal. Therefore, are you sure you need a JunctionBox for all your modifications. Hope it helps, Opaque |
|
January 28, 2008, 07:41 |
Re: how to access each cell of a face? (user fortr
|
#3 |
Guest
Posts: n/a
|
Thank you Opaque for your answer!
If you could still clarify one thing: I can't give the Normal X as an argument to my User Function in CFX-Pre because the function is called in a 3D region and Normal X is therefore not defined (or so the Solver says). How do I get the same information from inside my User Fortran subroutine? A Junction Box would be nice but not necessary, so maybe I'll just forget it and avoid some problems. -Katariina- |
|
January 28, 2008, 10:16 |
Re: how to access each cell of a face? (user fortr
|
#4 |
Guest
Posts: n/a
|
Dear Katariina,
The Normal X is defined for 2d Regions only. You will have the same problem within User Fortran, though. If you use the USER_GET_MESHDATA utility you can get normal vectors as well. However, you must know on which element group, or faces you need your data on. I still do not understand what you are trying to do. Therefore, a bunch of isolated tips may not be helpful. Opaque |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf problem | jane | Fluent UDF and Scheme Programming | 37 | February 20, 2018 05:17 |
Importing external DLL to Ansys CFX using user Fortran | snpradeep | CFX | 2 | May 16, 2014 04:52 |
Comparison between C/C++ and Fortran? | rick | Main CFD Forum | 45 | September 6, 2011 01:52 |
Double precision & User Fortran | Martijn | CFX | 3 | April 4, 2009 06:43 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |