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

User Subroutine

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 6, 2008, 11:21
Default User Subroutine
  #1
A. Said
Guest
 
Posts: n/a
Hallo All,

I want to write a user subroutine to set the outlet temperature to be equal to the inlet temperature plus some constant. I am working with periodic boundary conditions for the velocity and there I can't set these in the GUI.

I have never worked with user subroutine in CFX and I think it will take long time until I get it. Any help or hint is welcome.

Regards

A. Said.
  Reply With Quote

Old   March 6, 2008, 12:31
Default Re: User Subroutine
  #2
opaque
Guest
 
Posts: n/a
Dear A. Said,

Please contact ANSYS CFX help desk, and discuss your problem. Your setup has been tried previously and they can provide you with specific information.

Opaque.

  Reply With Quote

Old   March 6, 2008, 12:48
Default Re: User Subroutine
  #3
CycLone
Guest
 
Posts: n/a
You can't set a temperature at an outlet. Do you mean that you want to set the inlet temperature to the outlet plus a constant? Or are you looking to add a source term in your domain to influence the outlet temperature?
  Reply With Quote

Old   March 6, 2008, 16:36
Default Re: User Subroutine
  #4
A. Said
Guest
 
Posts: n/a
Thank you for your reply.

Actually, I am simulating thermal flow in a periodic domain, so the temperature at the outlet has the same distribution as that at the inlet but with a higher value [Tout=Tinlet+ qflux/(m.cp)]

Thanks a lot again

A. Said
  Reply With Quote

Old   March 6, 2008, 17:58
Default Re: User Subroutine
  #5
A. Said
Guest
 
Posts: n/a
Thank you for your reply.

Actually, I am simulating thermal flow in a periodic domain, so the temperature at the outlet has the same distribution as that at the inlet but with a higher value [Tout=Tinlet+ qflux/(m.cp)]

Thanks a lot again

A. Said
  Reply With Quote

Old   March 7, 2008, 10:34
Default Re: User Subroutine
  #6
CycLone
Guest
 
Posts: n/a
You would set this up as a periodic domain, rather than including an inlet and outlet. When you create the periodic interface, Pre will create corresponding boundary conditions. Edit one of the boundary conditions (either the upstream or downstream one, it doesn't matter which) and add an appropriate energy source term.

-CycLone
  Reply With Quote

Old   March 7, 2008, 10:35
Default Re: User Subroutine
  #7
CycLone
Guest
 
Posts: n/a
I should add that such a calculation is only valid if the material properties are not temperature dependant. Otherwise you cannot make the assumption of linear periodicity.

To drive the flow, you can specify a pressure drop or mass flow rate on the periodic interface.

-CycLone
  Reply With Quote

Old   March 7, 2008, 13:37
Default Re: User Subroutine
  #8
A. Said
Guest
 
Posts: n/a
Dear CycLone,

Thanks a lot for your answer. That is right, the problem is periodic. For the velocity it is straight forward but for the temperature (in the case of constant heat flux boundary or constant temperature boundary) is not so direct. If one specify a heat source at the periodic boundary, the temperature will increase without any limit for the case of constant heat flux.

Regards

A. Said

  Reply With Quote

Old   March 7, 2008, 15:23
Default Re: User Subroutine
  #9
CycLone
Guest
 
Posts: n/a
You can make your heat source a function of other sources within the domain or a function of the local or average temperature at the boundary. If you add sources in a case like this, it's up to you to ensure they balance.

-CycLone
  Reply With Quote

Old   March 7, 2008, 16:49
Default Re: User Subroutine
  #10
A. Said
Guest
 
Posts: n/a
Can you plz explain in a more detail.

Regards
  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
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31
How to deal with the user subroutine problem? Particle Siemens 21 May 19, 2006 10:30
User Subroutine Garryx Siemens 1 June 25, 2005 01:13
user subroutine BCDEFW for velocity Abe Siemens 2 December 12, 2003 10:29
discuss user subroutine in CFX Anicorl CFX 6 August 25, 2003 18:01


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