CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

how to access each cell of a face? (user fortran)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By opaque

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 25, 2008, 08:57
Default how to access each cell of a face? (user fortran)
  #1
Katariina
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!!

  Reply With Quote

Old   January 25, 2008, 11:57
Default Re: how to access each cell of a face? (user fortr
  #2
opaque
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

snowquote likes this.
  Reply With Quote

Old   January 28, 2008, 06:41
Default Re: how to access each cell of a face? (user fortr
  #3
Katariina
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-

  Reply With Quote

Old   January 28, 2008, 09:16
Default Re: how to access each cell of a face? (user fortr
  #4
opaque
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

  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 04:17
Importing external DLL to Ansys CFX using user Fortran snpradeep CFX 2 May 16, 2014 03:52
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 00:52
Double precision & User Fortran Martijn CFX 3 April 4, 2009 05:43
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 04:13.