Académique Documents
Professionnel Documents
Culture Documents
UsingExcel:Nomenclature,macroandtips
HOME
CONTACTUS
Selectthermodynamicmodelsforprocesssimulation
APracticalGuidetoaThreeStepsMethodology
Chapters
UsingExcel:Nomenclature,macroandtips
Casesstudies
Nomenclature
Chapter1:
title
Ineachfileassociatedtoalltheexamplesofthebook,asimplecolourcodehasbeenusedtohelpusertodifferentiatedata
Abstract
Tableof
andresults.Thefilesarenotblocked,norpasswordprotected,soallcellscanbechanged.Nevertheless,onlysomecells
contents
Examples
areusedasinputcellstomakeallcalculations.Theinputcellsarewritteninblueandthecalculatedcellsinblack.
Othercellsareusedtoconductiterativeproceduretoreachaspecificresultoroptimizeaspecificobjectivefunction.Inthis
case,thechangingcelliswritteninred,whiletheresultingcelliswritteninbrown.Inmostofthecases,anarrowwillbe
Chapter2:
FromFundamentalto
Properties
Abstract
Tableof
contents
Examples
placedinbetweencellstoshowtherelationshipfrominputtooutput.
Macro
Most of calculations in all the examples use macro commands. This technique is helpful and powerful. Reading of the
worksheetisclearerandeditioniseasier.Supposeyouwanttocalculatey=ax 2+b.Thecommontechniqueistodefinea
andbintwocell,sayC3=aandD3=b.Inothercellyougivethevalueofx,sayE5=x,thenyoucancalculatethevalueofy
Chapter3:
incellE6as=C3*E5*E5+D3.
title
Abstract
Tableof
YoucandothesamecreatingaMacro(menuTools>Macro>VisualBasicEditor)andwritingasmallfunctioninaModule.
contents
Examples
Ourcorrespondingexamplewillbe:
PublicFunctionMySample(xAsDouble,aAsDouble,bAsDouble)AsDouble
MySample=a*x*x+b
Chapter4:
EndFunction
title
Abstract
Tableof
contents
Examples
Intheworksheet,thecalculationcanbemade,forexampleincellE7writing
=MySample(E5,C3,D3).
An important feature of macro commands is the fact that you can make a complex calculation using logical tools. A very
simpleexamplecanbeconstructedcalculatingthefunctionsin(x)/x.Thisequationcannotbecalculatednumericallyinx=0,
Chapter5:
neverthelessitiswellknownthattheresulttendsto1.Thispropertycanbeusedinourfunction:
title
Abstract
Tableof
contents
Examples
PublicFunctionSinx_x(xAsDouble)AsDouble
Ifx=0Then<
Sinx_x=1#
Else
Sinx_x=Sin(x)/x
Chapter6:
EndIf
EndFunction
title
Abstract
Tableof
contents
Examples
Tips
Animportanttoolusedintheseexamplesisthe"GoalSeek"function,locatedinthe"Tools"menu.Thisspecialfeatureis
Chapter7:
used to solve problems of the kind f(x)=b. b is the value of the goal (defined by the coordinate of the cell as B15 for
Threephasesreactionsin
example,writteninbrown in our nomenclature) and x is the value to be changed (defined by the coordinate of the cell as
Clausstailgastreatment
D21forexample,inredasmentionedabove).
(CLAUSPOL)
It is convenient to install the "Solver" addin to your Excel. This sophisticated tool, allows multivariable optimization (or
solution)usedinfittingorregressionforexample.
Chapter10:
Some operations can be made on vectors or matrix and not only one cell. For example the sum of the she product of two
Complexpolarmolecular
arrayscanbewritteneasilyas:
descriptionforhighdilutionVLE
=SUM(B4:B10*C4:C10)
separation(ESTERFIPH)
.Donotforgettopresssimultaneouslythethreekeys"Shift""Control"and"Enter"tospecifythatthiscelliscalculatedasa
vectorcell.
Thesesamplescanbeseeninfile(xls):
http://books.ifpenergiesnouvelles.fr/ebooks/thermodynamics/help/help.html
Download
1/2
6/1/2015
UsingExcel:Nomenclature,macroandtips
Contacts TermsofUse 2011IFPEnergiesnouvelles
http://books.ifpenergiesnouvelles.fr/ebooks/thermodynamics/help/help.html
2/2