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

fortran common block

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2003, 07:17
Default fortran common block
  #1
A.M.Memarzadegan
Guest
 
Posts: n/a
Hi every body, I have a cfd code which declares variables through common block in a file named common.inc I can't add variables to it.for instance i want to increase some integer variables. What sould i do?
  Reply With Quote

Old   October 4, 2003, 10:31
Default Re: fortran common block
  #2
Jim Park
Guest
 
Posts: n/a
Don't understand the question. Why can't you add variables? Certainly FORTRAN allows for common blocks to be modified. Are you reading/writing files whose size and structure are tied to the size and structure of the common block?
  Reply With Quote

Old   October 4, 2003, 10:47
Default Re: fortran common block
  #3
A.M.Memarzadegan
Guest
 
Posts: n/a
Yeap It is realy amazing.when i add a line to declare other bunch of variables i face to lexical error(unrecognized statement) i want to add following line 2 ni1,ni2,nj1,nj2 under 1/alli/ni,nj,... in following file.

parameter(it=32,jt=32,kt=32,nphit=11)

common

1/pres/ipref,jpref,kpref

1/prin1/plane

1/prin2/indmon,imon,jmon,kmon

1/vecti/nsweep(nphit)

1/vectl/solve(nphit)

1/vectc/head(nphit)

1/vectr/phi(it,jt,kt,nphit),phio(it,jt,kt,nphit),prt(nphit ),

2 resor(nphit),reref(nphit),urf(nphit),ex(it),

3 deksi(it,jt,kt),deeta(it,jt,kt),dezeta(it,jt,kt),

4 dnksi(it,jt,kt),dneta(it,jt,kt),dnzeta(it,jt,kt),

5 dhksi(it,jt,kt),dheta(it,jt,kt),dhzeta(it,jt,kt),

6 conve(it,jt,kt),convn(it,jt,kt),convh(it,jt,kt),

7 smp(it,jt,kt),dtfals(nphit)

1/alli/ni,nj,nk,nim1,njm1,nkm1,iter,maxit,nphmax,itstep,n tstep

1/allr/great,small,sormax,betap,time,dt(10000),phimax(nph it),

2 phimin(nphit),dtv(it,jt,kt)

1/allc/scheme,schtur,name

1/alll/save,restrt,cycl,ortogo,steady,echo,wallq,polar

common

1/geom/xc(it,jt,kt),yc(it,jt,kt),zc(it,jt,kt),vol(it,jt,k t),

2 areaex(it,jt,kt),areaey(it,jt,kt),areaez(it,jt,kt) ,

3 areanx(it,jt,kt),areany(it,jt,kt),areanz(it,jt,kt) ,

4 areahx(it,jt,kt),areahy(it,jt,kt),areahz(it,jt,kt) ,

5 fx(it,jt,kt),fy(it,jt,kt),fz(it,jt,kt),

6 xp(it,jt,kt),yp(it,jt,kt),zp(it,jt,kt)

1/flupr/urfvis,viscos,densit,den(it,jt,kt),vis(it,jt,kt)

1/turb/cmucd,cmu,cd,c1,c2,cappa,elog,pfun,prandl

1/coef/ap(it,jt,kt),an(it,jt,kt),as(it,jt,kt),ae(it,jt,kt ),

2 aw(it,jt,kt),ah(it,jt,kt),al(it,jt,kt),

3 su(it,jt,kt),sp(it,jt,kt)

1/coefge/xksi(it,jt,kt),xeta(it,jt,kt),xzeta(it,jt,kt),

2 yksi(it,jt,kt),yeta(it,jt,kt),yzeta(it,jt,kt),

3 zksi(it,jt,kt),zeta(it,jt,kt),zzeta(it,jt,kt)

1/point/Tin,uin,u,v,w,p,pp,m,te,ed,t,f1,f2,f3

integer u,v,w,p,pp,m,te,ed,t,f1,f2,f3

logical solve,save,restrt,cycl,steady,ortogo,echo,wallq,po lar

character plane*2,head*24,scheme*2,schtur*2,name(nphit)*2 c end

  Reply With Quote

Old   October 4, 2003, 13:35
Default Re: fortran common block
  #4
TPallidum
Guest
 
Posts: n/a
Make sure the leading 2 in the new line is in the correct column for continuation and that there is a comma before ni1.
  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
[Commercial meshers] Icem Mesh to Foam jphandrigan OpenFOAM Meshing & Mesh Conversion 4 March 9, 2010 03:58
where can I find the information about all the common block? mactonald STAR-CD 0 May 31, 2009 05:49
droplets common block Habib Siemens 1 June 25, 2005 01:07
User Common Block...ODD? Robin CFX 0 June 14, 2005 07:30
STAR HPC. Problem with COMMON BLOCK Denis Siemens 0 April 4, 2003 08:33


All times are GMT -4. The time now is 15:46.