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

USRDCC scalar

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 31, 2004, 04:31
Default USRDCC scalar
  #1
Andrea
Guest
 
Posts: n/a
Hi all...

I need set the value of a user scalar in a steady state problem.

I'm using USRDCC variable but I don't know how set the value.

I tried the USRTRN but I can't set the value.

Thanks

Andrea
  Reply With Quote

Old   May 31, 2004, 09:44
Default Re: USRDCC scalar
  #2
Jeff
Guest
 
Posts: n/a
Andrea,

USRDCC variables are user variables that "start" with "USRDCC" (i.e. USRDCC_MYVAL). Once created in the command language by adding a user scalar variable and renaming it to 'USRDCC_myval', you can access it in any of the routines.

Try initializing it to something you can see and plot, like the x coordinate, in USRINT. USRINT only gets called at initialization (whereas USRTRN is a little more tricky as to when it gets called depending on the type of run).

Use the following:

CALL GETSCA('USRDCC_myval',IMYVAL,CWORK)

DO INODE = 1,NCELL

SCAL(INODE,IPHASE,IMYVAL) = {some value}

ENDDO

Run one iteration and you shoul be able to plot your USRDCC_myval variable in the post processor.

NOTE: USRDCC vars are only set at Cell centers (1 to NCELL) and the code interpolates to the boundary nodes. USRD variables require you to set all the nodes (1 to NNODE).

Jeff
  Reply With Quote

Old   May 31, 2004, 09:53
Default Re: USRDCC scalar
  #3
Andrea
Guest
 
Posts: n/a
Thank you...

I set the initial value using USRINT and I can plot the variable value in postprocess.

Now I need update the variable value at every iteration step (after the solution of the continuity equation nad the species transport equation).

I use USRVIS

USRDIF

USRSRC

USRINT

USRCND

In which is better update my scalar? How can I know when USRTRN is called in a steady state?

Regards

Andrea
  Reply With Quote

Old   June 3, 2004, 19:37
Default Re: USRDCC scalar
  #4
Jeff
Guest
 
Posts: n/a
USRCVG was coded originally to monitor convergence at each iteration. Therefore, this is a good place to update things like user scalars since it is called at the end of each iteration (NITER = 1 to MAXIT) after everything else is calculated.

USRTRN is really for transient runs and gets called each time step (you can tell which one by looking at the variable KSTEP). However, it can be useful for steady state runs where you want something to happen only at the end of the run (i.e. if your scalars are caclulational for output only an not used by any other equations as sources, etc.). USRTRN gets called once at the beginning of a steady state run with KSTEP=0 and once at the end with KSTEP = NSTEP.

The other routines you mentioned get called at various times and in a different order depending on the options set. You're better off in USRCVG or USRTRN.

Hope this helps, Jeff
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
dieselFoam problem!! trying to introduce a new heat transfer model vivek070176 OpenFOAM Programming & Development 10 December 24, 2014 00:48
Solving for an additional species CO in coalChemistryFoam N. A. OpenFOAM Programming & Development 2 November 13, 2014 09:43
Specifying nonuniform boundary condition maka OpenFOAM Running, Solving & CFD 59 October 22, 2014 14:52
CFX12 rif errors romance CFX 4 October 26, 2009 14:41
STAR-CD user-defined scalar Murali CD-adapco 0 February 12, 2003 23:52


All times are GMT -4. The time now is 16:49.