Jump to content



Featured Articles

Check out the latest featured articles.

File Library

Check out the latest downloads available in the File Library.

New Article

Product Viscosity vs. Shear

Featured File

Vertical Tank Selection

New Blog Entry

Low Flow in Pipes- posted in Ankur's blog

Aspen Fortran Issue


This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic
Share this topic:
| More

#1 Ingineer

Ingineer

    Brand New Member

  • Members
  • 2 posts

Posted 16 March 2014 - 12:24 AM

Dear Community

 

I am getting some type of "incomplete" error using FORTRAN on ASPEN PLUS v8.0 for optimization. 

The following is what appears when I try to move ahead (next).

 

Fortran error at line 1 
 
       RCOST=(0.035*(DIAM1**1.066)*(LEN1**0.082))+(0.035*(DIAM2**1.066)*(LEN2**.082))    
 
  unbalanced parentheses  
 
 
 
Here is the FORTRAN script
 
 
      RCOST=(0.035*(DIAM1**1.066)*(LEN1**0.082))+(0.035*(DIAM2**1.066)*(LEN2**.082))
      CCOST=100*(WCAT1+WCAT2)
      FHCOST=10**(-2.49+0.762*LOG10((QF1+QF2))
      COMPCOST=0.00433*(QCOMP**.82))
      CAPITAL=RCOST+CCOST+FHCOST+COMPCOST
      
      FHENERGY=0.000150*(QF1+QF2)/(31.5576*10**6)
      COMPENERGY=QCOMP*613*(10**-12)
      OPERATING=FHENERGY+COMPENERGY
      
      TAC=(CAPITAL/3)+OPERATING
 
And these are the defined variables
Defined Variable Path
 
FNHEXANE Mole-Flow Stream=FEED Substream=MIXED Component=N-HEXANE Units=kmol/hr
PNHEXANE Mole-Flow Stream=PRODUCT2 Substream=MIXED Component=N-HEXANE Units=kmol/hr
FBENZENE Mole-Flow Stream=FEED Substream=MIXED Component=BENZENE Units=kmol/hr
PBENZENE Mole-Flow Stream=PRODUCT2 Substream=MIXED Component=BENZENE Units=kmol/hr
WCAT1 Block-Var Block=REACTOR1 Variable=CATWT Sentence=PARAM
WCAT2 Block-Var Block=REACTOR2 Variable=CATWT Sentence=PARAM
DIAM1 Block-Var Block=REACTOR1 Variable=DIAM Sentence=PARAM Units=meter
DIAM2 Block-Var Block=REACTOR2 Variable=DIAM Sentence=PARAM Units=meter
LEN1 Block-Var Block=REACTOR1 Variable=LENGTH Sentence=PARAM Units=meter
LEN2 Block-Var Block=REACTOR2 Variable=LENGTH Sentence=PARAM Units=meter
QF1 Block-Var Block=FH1 Variable=QCALC Sentence=PARAM Units=cal/sec
QF2 Block-Var Block=FH2 Variable=QCALC Sentence=PARAM Units=cal/sec
QCOMP Block-Var Block=B1 Variable=NET-WORK Sentence=RESULTS Units=kW
 
 
Any help will be appreciated 
 
Thank You


#2 PingPong

PingPong

    Gold Member

  • Members
  • 1,466 posts

Posted 16 March 2014 - 05:27 AM

It is as Aspen already told you: unbalanced parantheses

 

 


 

 FHCOST=10**(-2.49+0.762*LOG10((QF1+QF2))

Here you have 3 left and 2 right brackets

 

 

COMPCOST=0.00433*(QCOMP**.82))

Here you have 2 right and 1 left bracket.

 

 


Edited by PingPong, 16 March 2014 - 05:29 AM.


#3 Ingineer

Ingineer

    Brand New Member

  • Members
  • 2 posts

Posted 16 March 2014 - 05:55 AM

Dear Pingpong 

 

Thank you for pointing this out, but even when this is sorted, Aspen finds error with the specified line

 

RCOST=(0.035*(DIAM1**1.066)*(LEN1**0.082))+(0.035*(DIAM2**1.066)*(LEN2**.082))   

 

Thank You






Similar Topics