CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Plotting subdomain energy source term (http://www.cfd-online.com/Forums/cfx/81246-plotting-subdomain-energy-source-term.html)

pandora October 20, 2010 17:08

Plotting subdomain energy source term
 
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

ghorrocks October 20, 2010 17:48

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 October 20, 2010 18:43

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 (Post 280043)
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.


michael_owen October 20, 2010 19:05

Create an algebraic Additional Variable, set it equal to your source function, and plot it in CFD Post.

pandora October 20, 2010 19:28

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

michael_owen October 20, 2010 19:35

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 October 20, 2010 20:03

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 (Post 280052)
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 October 20, 2010 20:49

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 October 20, 2010 21:08

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 (Post 280058)
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.


ghorrocks October 20, 2010 21:50

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.

pandora October 20, 2010 22:57

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 (Post 280065)
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.


michael_owen October 21, 2010 10:32

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 October 21, 2010 12:57

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 (Post 280164)
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 October 21, 2010 12:59

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 October 21, 2010 13:26

And what benefits would using FORTRAN add?

Quote:

Originally Posted by michael_owen (Post 280196)
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 October 21, 2010 13:36

Possibly circumventing the CFX memory allocation limits. But frankly, I'm not sure.

pandora October 21, 2010 13:47

Thank you Michael for all your help.

Quote:

Originally Posted by michael_owen (Post 280205)
Possibly circumventing the CFX memory allocation limits. But frankly, I'm not sure.



All times are GMT -4. The time now is 11:42.