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

posdat file to record heat release

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 16, 2012, 12:15
Default posdat file to record heat release
  #1
New Member
 
Robert
Join Date: Mar 2011
Location: Cambridge UK
Posts: 11
Rep Power: 15
Robert_B is on a distinguished road
Hello

I'm running a transient reacting simulation. I want to be able to plot contours of heat release rate throughout my domain.

I know that I need to write a subroutine in posdat.f in order to calculate and store values of heat release rate from each of my cells. Has anyone managed to do this successfully, and if yes, would you mind sharing your posdat.f file with me?

Cheers
Rob
Robert_B is offline   Reply With Quote

Old   February 20, 2012, 22:38
Default
  #2
Member
 
zheng jianjun
Join Date: Jan 2010
Posts: 46
Rep Power: 16
skylent is on a distinguished road
c************************************************* ************************
subroutine posdat(level)
c Post-process data
C************************************************* ************************
C--------------------------------------------------------------------------*
C STAR-CD VERSION 4.06.000
C--------------------------------------------------------------------------*
USE allmod
IMPLICIT NONE
INCLUDE 'std.inc'
c
c Argument variables
INTEGER level
C-------------------------------------------------------------------------
C
C This subroutine enables the user to output data and is called
C at the beginning and at the end of each iteration/time step,
C i.e.
C if (level.eq.1) then
c.> called at the beginning of iteration/time step
C else if (level.eq.2) then
c.> called at the end of iteration/time step
C end if
C Any user code which is not enclosed in the IF condition will
C be executed for both calls
C
C Note: 1. File units available to the users for opening their own
C files are from 84 to 89. Users may write to unit 6 or 60
C if they want to see their output on the terminal or
C the run file.
C 2. All variables passed to this routine use STAR cell
C numbering, which is different from pro-STAR cell numbers.
C pro-STAR cell number can be obtained from a STAR cell
C number ICSTAR by ICPROSTAR=ICLMAP(ICSTAR)
C-------------------------------------------------------------------------
c Local variables
INTEGER nd,nset,i,j,k,icprostar
INTEGER moni(4) c-
定义数组,存储4prostar单元编号
INTEGER monis(4) c-
定义数组,存储对应的star单元编号
DATA moni/111,112,113,114/ c -
给定4prostar单元编号
DATA monis/0,0,0,0/
c&&&

if (intflg(128).eq.0) then
CC--- Find out cell id of star from cell id of prostar
,找出与prostar单元编号对应的star单元编号
call cset(cs,0,ND_ALL,NSD_ALL,INTERNAL)
do nset=1, cs%no
do i=cs%ns(nset),cs%ne(nset)
icprostar=iclmap(i)
do j=1,4
if(icprostar.eq.moni(j))then
monis(j)=i
write(6,*)'monitor',j,'icprostar=',icprostar,
& 'icstar=',monis(j)
write(60,*)'monitor',j,'icprostar=',icprostar,
& 'icstar=',monis(j)
exit
end if
end do
end do
end do
CC---------------------------------------------------
C first iteration, so open files
第一步,打开三个文件,用于存储u,v,p
if (.not.parrun) then
open(85,file='MonitU',form='formatted',status='unk nown')
open(86,file='MonitV',form='formatted',status='unk nown')
open(87,file='MonitP',form='formatted',status='unk nown')
end if
intflg(128)=1
c else files already open
end if
c
if (level.eq.1) return
c
CC--
获取u,v,p,并写入文件。
if (.not.parrun) then
write(85,800) iter,(u(1,monis(k)),k=1,4)
write(86,800) iter,(u(2,monis(k)),k=1,4)
write(87,800) iter,(pabs(monis(k)),k=1,4)
end if
800 format(i8,1p,5e11.3)

end
C
skylent is offline   Reply With Quote

Old   February 21, 2012, 13:17
Default
  #3
New Member
 
Robert
Join Date: Mar 2011
Location: Cambridge UK
Posts: 11
Rep Power: 15
Robert_B is on a distinguished road
Thanks Skylent, but I really need it all in western script. StarCD can't understand the Chinese symbols and unfortunately neither can I.

Any chance of a translation?

Cheers
Rob
Robert_B is offline   Reply With Quote

Old   March 1, 2012, 13:24
Default
  #4
New Member
 
Robert
Join Date: Mar 2011
Location: Cambridge UK
Posts: 11
Rep Power: 15
Robert_B is on a distinguished road
Ah sorry Skylent - I just realised that the non-Western characters only appear in comment lines. So the compiler doesn't need to read them.

I'm a Fortran novice, so please excuse me.

I've now got my simulation running with the posdat.f subroutine. I'll see over the next few days whether I've set it up properly.

Cheers
Rob
Robert_B is offline   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
GPU Linear Solvers for OpenFOAM gocarts OpenFOAM Announcements from Other Sources 37 August 17, 2022 15:22
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 14:14
Compiling OpenFOAM13 on AMD64 with Redhat Enterprise mbeaudoin OpenFOAM Installation 20 June 17, 2008 07:43
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 21:51
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 12:55.