# SOURCE TERM USER ROUTINE

 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 25, 2001, 13:00 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

 April 26, 2001, 11:38 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

 April 26, 2001, 12:15 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

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Mac Siemens 0 November 27, 2006 22:42 Mech.eng. Siemens 0 March 16, 2006 06:15 wayne CFX 1 August 30, 2005 06:55 sam Siemens 2 June 11, 2005 12:37 Jeff Siemens 3 January 6, 2003 05:26

All times are GMT -4. The time now is 03:17.