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

SOURCE TERM USER ROUTINE

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2001, 14:00
Default SOURCE TERM USER ROUTINE
  #1
Mario
Guest
 
Posts: n/a
To add scalar source terms in the user-subroutine SORSCA, the source terms come in a linearized form: Source=S1P-S2P*Scalar(IS) To fix the source term to a given value, it is possible to introduce S1P=GREAT*VALUE, where great is a very large number (S2P has to be of character GREAT too). Does anyone know how to just add a value to a scalar, without fixing it to a value? I tried to use S1P without the Great and added a value to the scalar (S1P=SCALAR(IS)+VALUE), but a test showed that it didn`t work properly. Thanks for any suggestions. Regards Mario
  Reply With Quote

Old   April 26, 2001, 12:38
Default Re: SOURCE TERM USER ROUTINE
  #2
Ossi
Guest
 
Posts: n/a
Hi,

you should first activate the scalar you want to use and then activate the possibility that the scalar will have a source term (from the Analysis Controls/Miscellaneous Conntrols).

Then in the subroutine sorsca.f you should include an if-statement that questions what scalar is to have a source term, like e.g. if(IS.eq.11)then ... Do not include the scalar itself to the source term (SP1 or SP2) because it is already there if you use the linear term SP2 (remember, Source term = SP1 - SP2*scalar(11) !). Finally, make sure your units are right: the constant part SP1 has the units of your source term (e.g. kg/m3s) BUT the linear part's unit times that of the scalar's unit is equal to the source term unit (if you are dealing with a mass fraction, then the linear part has the unit of the constant part, e.g. SP1 - SP2*scalar(11) = [kg/m3s] - [kg/m3s]*[kg/kg], but the scalar needs not to be a mass fraction)

Regs.,

Ossi
  Reply With Quote

Old   April 26, 2001, 13:15
Default Re: SOURCE TERM USER ROUTINE
  #3
Mario
Guest
 
Posts: n/a
Hi Ossi,

I made the mistake to introduce S1P=SCALAR(1)+VALUE while S2P=1. I thought that if I would choose the VALUE as zero, in order to test the calculations, the results should be the same as if I would work without a subroutine. But I learned that the constant and linear parts are used in different iteration parts (inner and outer iterations) and that there is no need to use the scalar at the constant part.

Thanks for your response!! Regards Mario
  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 sub-routine Mac Siemens 0 November 27, 2006 23:42
Source term for user defined scalars Mech.eng. Siemens 0 March 16, 2006 07:15
confused about particle user source sub-routine wayne CFX 1 August 30, 2005 07:55
user sub Routine sam Siemens 2 June 11, 2005 13:37
User viscosity routine and user scalars? Jeff Siemens 3 January 6, 2003 06:26


All times are GMT -4. The time now is 01:39.