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

Plotting subdomain energy source term

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2010, 18:08
Question Plotting subdomain energy source term
  #1
New Member
 
Antonio
Join Date: Aug 2010
Posts: 19
Rep Power: 16
pandora is on a distinguished road
Hi, everyone

I am trying to plot an energy source term I have added in a CFX subdomain. I want to check the plot of the source terms in my domain to see if its interpolating correctly. I knew how to do this with Fluent but not with ANSYS12 workbench. Does anyone know an easy way to do this?

Thanks in advance
pandora is offline   Reply With Quote

Old   October 20, 2010, 18:48
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Does it evaluate to a single value, or do does the source vary over space?

For the first, write it to a CEL variable and send it to a monitor point. For the second write it to an additional variable (a CEL variable) and view it is CFD-Post.
ghorrocks is offline   Reply With Quote

Old   October 20, 2010, 19:43
Default
  #3
New Member
 
Antonio
Join Date: Aug 2010
Posts: 19
Rep Power: 16
pandora is on a distinguished road
Thank you for your prompt reply. What you say makes sense but I'm kind of a newbie to ANSYS12 and I would appreciate if you could develop this a little bit more. I really don't know how to do what you are proposing.

Up to now I have created a 3D user defined function in CFX-Pre (it imports x,y,z coordinates and the energy) and used it as a source in a subdomain. As far as I know this is the data interpolation method. I haven't created a CEL routine even though I read in the manual that first you create the CEL routine and then the function. It seems to work though but this could be the reason why I don't seem my function in CFX-Post.

Am I misunderstanding something? Do I really have to define my CEL routine? Could you please shed some light on this?

Already thank you for your time!



Quote:
Originally Posted by ghorrocks View Post
Does it evaluate to a single value, or do does the source vary over space?

For the first, write it to a CEL variable and send it to a monitor point. For the second write it to an additional variable (a CEL variable) and view it is CFD-Post.
pandora is offline   Reply With Quote

Old   October 20, 2010, 20:05
Default
  #4
Senior Member
 
Michael P. Owen
Join Date: Mar 2009
Posts: 196
Rep Power: 17
michael_owen is on a distinguished road
Create an algebraic Additional Variable, set it equal to your source function, and plot it in CFD Post.
michael_owen is offline   Reply With Quote

Old   October 20, 2010, 20:28
Default
  #5
New Member
 
Antonio
Join Date: Aug 2010
Posts: 19
Rep Power: 16
pandora is on a distinguished road
Thank you guys. that made the trick. If someone still has the time to clarify why the manual recommends creating a CEL routine before the user defined function it would help me understand the intricacies of the workbench. An example on when to go by each of this ways would be enough.

thanks
pandora is offline   Reply With Quote

Old   October 20, 2010, 20:35
Default
  #6
Senior Member
 
Michael P. Owen
Join Date: Mar 2009
Posts: 196
Rep Power: 17
michael_owen is on a distinguished road
Can you quote the section of the manual?

I always use a CEL expression (not a "routine" (?) ) to reference 1d interpolation user function to facilitae plotting them in pre to check that they are correct.
michael_owen is offline   Reply With Quote

Old   October 20, 2010, 21:03
Default
  #7
New Member
 
Antonio
Join Date: Aug 2010
Posts: 19
Rep Power: 16
pandora is on a distinguished road
This is what the manual says. I'm not sure to understand what it means though:



User CEL Functions are used in conjunction with User CEL Routines. A User Function must be created after a User CEL Routine. For details, see User CEL Routines. User Functions set the name of the User CEL Routine associated with the function, the input arguments to pass to the routine and the expected return arguments from the routine.
  1. Select the User CEL Routine name (user routine name) from the dropdown list that the function will apply to. For details, see Function Name.
  2. Enter the input Argument Units list to pass to the subroutine.
    For details, see Argument Units.
  3. Enter the Result Units list output from the subroutine.
    For details, see Result Units.






Quote:
Originally Posted by michael_owen View Post
Can you quote the section of the manual?

I always use a CEL expression (not a "routine" (?) ) to reference 1d interpolation user function to facilitae plotting them in pre to check that they are correct.
pandora is offline   Reply With Quote

Old   October 20, 2010, 21:49
Default
  #8
Senior Member
 
Michael P. Owen
Join Date: Mar 2009
Posts: 196
Rep Power: 17
michael_owen is on a distinguished road
You don't have a user CEL routine, you have a 3D interpolation user function. You can either create a CEL expression to reference or not whichever you prefer.
michael_owen is offline   Reply With Quote

Old   October 20, 2010, 22:08
Default
  #9
New Member
 
Antonio
Join Date: Aug 2010
Posts: 19
Rep Power: 16
pandora is on a distinguished road
Hi again Michael. It's probably the concept what I don't understand. The difference between a CEL routine/expression and a user function. I've been looking through the manual trying to find a consistent definition but I haven't seen anything. Would you mind developing this a little bit more?

Btw, I'll make the most of your expertise. I hope you don't mind! I'm having trouble working with big source meshes (200x200x40). Memory allocation problems that don't get fixed even when raising the stack size in the advance panel option. Doesn't seem to me big enough so that a program like ANSYS can't handle it. Any workaround for this?

Thank in advance


Quote:
Originally Posted by michael_owen View Post
You don't have a user CEL routine, you have a 3D interpolation user function. You can either create a CEL expression to reference or not whichever you prefer.
pandora is offline   Reply With Quote

Old   October 20, 2010, 22:50
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Quote:
The difference between a CEL routine/expression and a user function.
The bit of the doco you quoted above is the bit to make custom CEL expressions using fortran. If you are a beginner this is not the bit you are looking for. You will want the built-in CEL expressions.

Quote:
I'm having trouble working with big source meshes (200x200x40). Memory allocation problems
The ANSYS mesher is very memory intensive. This is a big problem for large meshes. If you are using hex meshes then define the block as a hex mesh so the mesher does not try to tet mesh it. But if you still can't mesh it I would forget WB and move to ICEM. It handles big meshes much better than WB.
ghorrocks is offline   Reply With Quote

Old   October 20, 2010, 23:57
Default
  #11
New Member
 
Antonio
Join Date: Aug 2010
Posts: 19
Rep Power: 16
pandora is on a distinguished road
Hi again

With source mesh I was referring not so much to the model mesh, but to the source mesh. In other words, I am interpolating a 3D source (200x200x40) I have in a file onto my ANSYS mesh, which is finer. For such a size of the source mesh I get the memory allocation problem I was talking about before. Any ideas on what to do?

Quote:
Originally Posted by ghorrocks View Post
The bit of the doco you quoted above is the bit to make custom CEL expressions using fortran. If you are a beginner this is not the bit you are looking for. You will want the built-in CEL expressions.



The ANSYS mesher is very memory intensive. This is a big problem for large meshes. If you are using hex meshes then define the block as a hex mesh so the mesher does not try to tet mesh it. But if you still can't mesh it I would forget WB and move to ICEM. It handles big meshes much better than WB.
pandora is offline   Reply With Quote

Old   October 21, 2010, 11:32
Default
  #12
Senior Member
 
Michael P. Owen
Join Date: Mar 2009
Posts: 196
Rep Power: 17
michael_owen is on a distinguished road
So you have 800,000 data points in your 3D interpolation user function? Can you reduce the resolution of it? Do you need that resolution?

Failing that, what is the exact error you get, and what are the exact memory settings you are using?
michael_owen is offline   Reply With Quote

Old   October 21, 2010, 13:57
Default
  #13
New Member
 
Antonio
Join Date: Aug 2010
Posts: 19
Rep Power: 16
pandora is on a distinguished road
Yes, ideally I would need such a resolution. I don't recall now the exact error and I can't reproduce it now. But it basically was a MEMORY ALLOCATION PROBLEM that happened even before the code started running (while preparing for the run). I guess that it was doing the interpolation and ran out of memory. IT recommended raising the stack size but nothing changed even when setting all to the maximum allowable. Any clues?

Quote:
Originally Posted by michael_owen View Post
So you have 800,000 data points in your 3D interpolation user function? Can you reduce the resolution of it? Do you need that resolution?

Failing that, what is the exact error you get, and what are the exact memory settings you are using?
pandora is offline   Reply With Quote

Old   October 21, 2010, 13:59
Default
  #14
Senior Member
 
Michael P. Owen
Join Date: Mar 2009
Posts: 196
Rep Power: 17
michael_owen is on a distinguished road
Break up the source subdomain into multiple, smaller subdomains and use multiple, smaller 3D interpolation tables. That's the best idea I have without either reducing the resolution of the tabular data or using FORTRAN.
michael_owen is offline   Reply With Quote

Old   October 21, 2010, 14:26
Default
  #15
New Member
 
Antonio
Join Date: Aug 2010
Posts: 19
Rep Power: 16
pandora is on a distinguished road
And what benefits would using FORTRAN add?

Quote:
Originally Posted by michael_owen View Post
Break up the source subdomain into multiple, smaller subdomains and use multiple, smaller 3D interpolation tables. That's the best idea I have without either reducing the resolution of the tabular data or using FORTRAN.
pandora is offline   Reply With Quote

Old   October 21, 2010, 14:36
Default
  #16
Senior Member
 
Michael P. Owen
Join Date: Mar 2009
Posts: 196
Rep Power: 17
michael_owen is on a distinguished road
Possibly circumventing the CFX memory allocation limits. But frankly, I'm not sure.
michael_owen is offline   Reply With Quote

Old   October 21, 2010, 14:47
Default
  #17
New Member
 
Antonio
Join Date: Aug 2010
Posts: 19
Rep Power: 16
pandora is on a distinguished road
Thank you Michael for all your help.

Quote:
Originally Posted by michael_owen View Post
Possibly circumventing the CFX memory allocation limits. But frankly, I'm not sure.
pandora is offline   Reply With Quote

Reply

Tags
plotting, source, subdomain


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
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51
UDF Scalar Code: HT 1 Greg Perkins FLUENT 8 October 20, 2000 13:40
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 14, 2000 00:03
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 04:43


All times are GMT -4. The time now is 14:37.