Delft University of Technology
A look-up table method based on unstructured grids and its application to non-ideal
compressible fluid dynamic simulations
Rubino, A.; Pini, M.; Kosec, M.; Vitale, S.; Colonna, P.
DOI
10.1016/j.jocs.2018.08.001
Publication date
2018
Document Version
Final published version
Published in
Journal of Computational Science
Citation (APA)
Rubino, A., Pini, M., Kosec, M., Vitale, S., & Colonna, P. (2018). A look-up table method based on
unstructured grids and its application to non-ideal compressible fluid dynamic simulations. Journal of
Computational Science, 28, 70-77. https://doi.org/10.1016/j.jocs.2018.08.001
Important note
To cite this publication, please use the final published version (if applicable).
Please check the document version above.
Copyright
Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons. Takedown policy
Please contact us and provide details if you believe this document breaches copyrights. We will remove access to the work immediately and investigate your claim.
This work is downloaded from Delft University of Technology.
application
to
non-ideal
compressible
fluid
dynamic
simulations
A.
Rubino
a,
M.
Pini
a,∗,
M.
Kosec
b,
S.
Vitale
a,
P.
Colonna
aaDelftUniversityofTechnology,AerospaceEngineeringFaculty,PropulsionandPower,Kluyverweg1,2629HSDelft,TheNetherlands bStanfordUniversity,AeronauticsandAstronautics,Stanford,94305CA,UnitedStates
a
r
t
i
c
l
e
i
n
f
o
Articlehistory: Received28May2018
Receivedinrevisedform18July2018 Accepted1August2018
Availableonline9August2018 Keywords: Look-uptable Trapezoidalmap Unstructuredmesh Thermodynamicmodeling Interpolation Real-gasflows
Non-idealcompressibleflow NICFD
CFD
a
b
s
t
r
a
c
t
Fastandaccuratecomputationofthermo-physicalpropertiesisessentialincomputationallyexpensive simulationsinvolvingfluidflowsthatsignificantlydepartfromtheidealgasoridealliquidbehavior.A look-uptablealgorithmbasedonunstructuredgridsisproposedandappliedtonon-idealcompressible fluiddynamicssimulations.Thealgorithmgrantsthepossibilityofafullyautomatedgenerationofthe tabulatedthermodynamicregionforanyboundaryandtousemeshrefinement.Resultsshowthatthe proposedalgorithmleadstoacomputationalcostreductionuptooneorderofmagnitude,whileretaining thesameaccuracylevelcomparedtosimulationsbasedonmorecomplexequationofstate.Furthermore, acomparisonoftheLuTalgorithmwithauniformlyspacedquadrilateraltabulationmethodresultedin similarperformanceandaccuracy.
©2018TheAuthors.PublishedbyElsevierB.V.ThisisanopenaccessarticleundertheCCBYlicense (http://creativecommons.org/licenses/by/4.0/).
1. Introduction
Theaccurateestimationofthermo-physicalpropertiesof flu-idsisessentialfor manyengineeringandscientificapplications, anditrequirescomplexmodelsincasethebehaviorofthefluid departsfromthatoftheidealgasoridealliquid.Fluids exhibit-ingnon-idealbehaviorareinvolvedinvarioustechnologiessuchas advancedpowerandpropulsionsystems,refrigerationandair con-ditioningsystems,oilandgasprocesses,etc.[1–4].Inthesecases, theevaluationofthermo-physicalpropertiesisoftennecessaryfor systemdesignandperformanceevaluationortosimulatetheflow behaviorwithincomponents.Fluiddynamicsimulationsofvapors innon-idealstatesarealsoemployedinmorefundamentalresearch (see,e.g.,Ref.[5])andthebranchoffluidmechanicsdealingwith thistypeoffluidflowswasrecentlytermednon-idealcompressible fluiddynamics(NICFD)[6].
Thecomputationalcostassociatedwithfluidthermodynamic modelsexpressedintermsofequationsofstate(EoS)canbecome alimitingfactorifaccurateestimationsareneededin combina-tionwithexpensivesimulations.Thisisthecase,e.g.,inthedesign andoptimizationofindustrialcomponents[7]orincomputational
∗ Correspondingauthor.
E-mailaddress:M.Pini@tudelft.nl(M.Pini).
fluiddynamics(CFD)[8].Inordertodecreasethecomputational timerelatedtothecalculationofthermo-physicalfluidproperties, whilemaintainingasatisfactorylevelofaccuracy,look-uptable (LuT)methodsareconvenientandwidelyadopted[9].
ALuTmethodconsistsofthreebasicparts:1.Thetabulation ofadiscretesetofvaluesofthermodynamicproperties pertain-ingtostatesgeneratedwithagivenEoS-basemodel;2.Asearch algorithm;3.Aninterpolationmethod.Sincethetabulationis per-formedonlyonce,atpreprocessinglevel,this wayofevaluating fluidthermophysicalpropertiescangreatlyreducethe computa-tionaleffortifthemodelsarebasedoncomplexEoS,providedthat theassociatedsearchalgorithmisefficient.Furthermore,the inter-polationtechniquemustbecarefullychoseninordertoachievea satisfactorylevelofaccuracy,whichisafundamentalrequirement toguaranteeconvergenceinCFDsimulationsandaccuracyofthe finalresult.LuTmethodsbasedonastructuredmeshof thermody-namicregionofinteresthavebeendocumentedintheliterature
[10,11,9,12]. In order to increase the accuracy and decreasing thenumberofdiscretizationpointsforthermodynamicregionof interest,algorithmsbasedonadaptiveCartesianmeshhavebeen proposed[13,14].However,theuseofquadrilateralgrids,in com-binationwithlocalrefinement,canleadtolocaldiscontinuities andpoorinterpolationaccuracyofpropertiesintheproximityof smoothboundaries[15,13].Thiscanespeciallyoccurfor
proper-https://doi.org/10.1016/j.jocs.2018.08.001
Fig.1.ThermodynamictriangularmeshforthesiloxaneMDM.(a)Regularthermodynamicmesh.(b)Refinedthermodynamicmesh.
tiesreconstructionorforinterpolationclosetothevapor–liquid saturationline.
Thestudydescribedhereresultedinug-LUT,anewLuTmethod basedonmeshingthermodynamicregionofinterestbymeansof unstructuredtriangulargrids.Thegenerationofmultidimensional thermodynamictablesisfullyautomated,evenincasemultiple fluidphasesneedtobecomputed.Unstructuredgridsallowfor meshrefinements,a valuablefeatureincaseofstrongproperty variations,whichoccurinproximityofthevapor–liquidcritical point,and ofthesaturationlineingeneral.Theug-LUTmethod isapplicablealsotomulti-componentfluids.Asearchalgorithm basedonatrapezoidalmapofthetabulatedregioncontributes sig-nificantlytoitscomputationalefficiency.Theug-LUTmethodfor thermo-physicalpropertycalculationsisimplementedwithinthe open-sourcecodeSU2[16–18]anditsverificationispresentedby meansofparadigmaticCFDtestcasesofincreasingfidelity.Finally, theug-LUTalgorithmiscomparedtoastructured-basedLuTwith theaimofassessingitscomputationalcostandmemory require-ments.
2. Method
2.1. Generationofthermodynamicmesh
Anunstructuredmeshisgeneratedforthermodynamicdomain of interest. A 2D gridgenerator [19], based onthe Advancing-Delaunayfront method,isusedin this study.Theadoptedgrid generatorallowsforlocalrefinementsinselectedregionsof ther-modynamic domain.Fig. 1 shows examplesof thermodynamic meshes for siloxane MDM (octamethyltrisiloxane,C8H24O2Si3),
generatedbyselectingTandlog()asinputstatevariables.The useofunstructuredmeshincombinationwithlocalrefinementis proposedhereasaneffectivealternativetostructuredand quad-treegrids.Quad-treebasedalgorithmsareefficientforcontrolling themeshrefinementlevel,butcansufferfromthefollowingissues
[15,13]:(i)storingandretrievingthemeshconnectivityassociated totherecursivetreestructure;(ii)hangingnodesatdifferentsizes cellsinterfaces,ifcontinuouspropertyreconstructionisrequired; (iii)additionalinterpolation,triangulationoracurvilinearmesh systemmightbenecessarytoreconstructsmoothboundaries(e.g. vapor–liquidsaturationline).
Oncethemeshpatches aregenerated usinganysuitableset ofstatevariables(twoifthefluidispure),allotherneededfluid thermo-physicalpropertiesarecomputedateachmeshnodewith anappropriatethermodynamiclibrary.Thecurrent implementa-tionoftheug-LUTmethodmakesuseofanexternalthermodynamic library[20],whichembedsalargevarietyofmodelsbasedon com-plexequationsof state(EoS).Asanexample,Fig.2 reportsthe
Fig.2. TabulatedpressurecontoursobtainedforthesiloxaneMDM.
pressurecontourforsiloxaneMDM,obtainedusingamodelbased onanEoSintheSpan-Wagnerfunctionalform[21].
2.2. Searchalgorithm
Oncethesetofthermo-physicalpropertiesfortheselectedfluid arestoredintabularform,asearchalgorithmisusedtoretrieve thebestapproximationofthequerystateorpoint.Apoint loca-tionalgorithmbasedonatrapezoidalmaphasbeenadopted[22]
becauseofthefollowingconsiderations:(i)thesamegeometrical connectivityisusedforallthesearchpairs.Thisisespecially ben-eficialbecausetheconnectivityhasnottoberecomputedforeach searchpairanditcanbeusedtosearchinhighlyskewed thermody-namicplanes.Asanexampleforthis,iftheinitialthermodynamic meshisbuiltforthe(P,)plane,theresultingmeshonthe(h,s) planewillbehighlyskewed;(ii)searchingforthetriangle contain-ingthequeryvectorbyresortingtoalgorithmsthatdonotusethe meshconnectivityinformation(e.g.kd-tree)onanirregularand highlyskewedgridcanleadtoinaccurateinterpolation;(iii) trape-zoidalmapsworkforgeneralpolyhedra.Thesearchalgorithmcan beusedtoswitchbetweendifferentmeshzones,characterizedby apolyhedronoutline.Thisfeatureallowstoavoidamappingfor gridsnotconformingwitharectangularthermodynamicdomain
[13].
GiventhesetSofntriangularmeshedges,thetrapezoidalmap T (S)isbuiltaccordingtothefollowingsteps(seeFig.3):
1.auniquesetofedgesandthecorrespondinglistofitsx coordi-natesiscreatedbyfilteringoutduplicates;
Fig.3.Schematicrepresentationofthetrapezoidalmapforanunstructuredgrid.
2.theintersectingedgesareassociatedtoeachband; 3.theedgesineachbandaresorted.
Thetrapezoidalmap T (S)iscreatedina preprocessingstage foreachthermodynamicsearchpair,e.g.,(h,s),(,
v
),etc.Amore detaileddescriptionofthetrapezoidalmapalgorithmcanbefound inAppendixA.Themeshsimplex,containingthequerypointqwithinT (S),is identifiedaccordingtothefollowingprocedure:
1.thexcoordinateofthequerypointisobtainedwithabinary searchforitscontainingband;
2.withinthecontainingband,theedgeaboveandtheonebelow thequerypointareidentified;
3.thesimplexcontainingthequerypointissingledoutbyusing theedge-to-faceconnectivityofthetwoedgesselectedduring thepreviousstep.
ThequeryalgorithmisalsodetailedinAppendixA.
2.3. Interpolationmethod
Atwo-dimensionallinearinterpolationproblemcanbewritten as
f(x,y)=Ni=1wigi(x,y)=WTG(x,y)=GT(x,y)W, (1)
whereG(x,y)isaninterpolationbasiswhichtransformsthequery coordinatesx,y(rawfeatures)intoNlinearlyindependent inter-polationfeatures.AnexampleofapolynomialbasisfunctionG(x, y)onatriangle(threepoints,N=3)isgivenby
G(x,y)=[1,x,y]T. (2)
In the implemented thermodynamic look-up-table, the two-dimensionalcoordinatesarethermodynamicpairssuchas(,u), (P,T),(h,s).ThischoiceofG(x,y)wasfoundtobesufficiently accu-rate,providedthatarelativelyfinemeshforthelook-up-tableis used.ThevectorofweightsWisfoundthrough
A=
⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎣
GT(x 1,y1) . . . GT(x i,yi) . . . GT(x N,yN)⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦
, F=⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎣
f(x1,y1) . . . f(xi,yi) . . . f(xN,yN)⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦
, AW=F (3) canbewrittenas G(xq,yq)TW=FTV, (4)wheretheinterpolationweightsVarenowtheadjointsolutionof
ATV=G(xq,yq). (5)
Theequivalenceofthetwoformulationscanbeputintoevidence by[23]
VTF=VT(AW )=(ATV )TW=G(xq,yq)TW. (6)
The weights V can be computed once for a given query point andreusedtocalculatethedifferentthermodynamicproperties ofinterest.Forexample,iftwelvepropertiesneedtobe interpo-lated,only onematrix-multiplicationis requiredpereachmesh triangle,insteadofthetwelvewhichwouldbeneededwiththe primalinterpolationmethod.Additionally,sincethe(AT)−1matrix
dependsonlyonaprioriestablishedvalues,itcanbecompletely pre-computedwithoutadditional runtimecost.If thecondition numberofthematrixishigh,apseudo-inverseshouldbeapplied; inthiscasepre-computationisonlypossiblewiththeprimal inter-polation.
3. ApplicationtoNICFDsimulations
Inordertoverifyandprovideinformationontheperformance oftheug-LUTmethod,threeCFDtestcasesofincreasingcomplexity levelarediscussed.Theselectedtestcasesfeatureexpansions char-acterizedbyrelevantnon-idealcompressiblefloweffects,requiring theuseofcomplexequationsofstatetoaccuratelycomputethe flowbehavior.ThesimulationsareperformedwithSU2[16],acode previouslyverifiedfornon-idealcompressiblefluiddynamics sim-ulations[24].Foralltestcases,theconvectivefluxesarediscretized byageneralizedRoescheme[25,24],andsecond-orderaccuracyis achievedwiththeMUSCLapproach[26].Ref.[16]providesamore detaileddescriptionoftheflowsolverandtheassociatednumerical methods.
Thermodynamicpropertiesneededbytheflowsolver,whose valueisinterpolatedfromthevaluesstoredintheLuT,are ,P,T,c,e,h,s,
∂
P∂
e ,
∂
P∂
e.
Thepartialderivativesofthepressurearenecessarytocalculate theconvectivefluxesinnon-idealcompressibleflowsimulations, see,e.g.,Ref.[18].
3.1. 2Dsupersonicnozzle
Thegeometryoftheconverging–divergingsupersonicnozzle isdepictedinFig.5a,togetherwiththeMachcontourresulting fromtheEulersimulation.Thetwo-dimensionalflowdomainis discretizedwithapproximately15,000triangularmeshelements
Fig.4.2Dinviscidsupersonicnozzlesimulationresults.(a)Normalizedcomputationalcostofthesimulationemployingthelook-uptablemethod(ug-LUTsim)compared tothatofthesimulationobtainedusingtheSpan-Wagnerthermodynamicmodel(SWsim).(b)Relativemeansquareerror(RMSE)oftheMachfieldfromtheSWsimand ug-LUTsim.TheSWsimresultsaretakenasreference.
Fig.5. 2Dinviscidsupersonicnozzlesimulationresults,obtainedwithathermodynamicmeshofapproximately20,000nodes.(a)Machnumbercontourobtainedwiththe ug-LUTalgorithm.(b)MachnumberdistributionatcenterlineobtainedfromtheIGsim,SWsim,andug-LUTsim.
Table1
Inputparametersforthe2Dinviscidsupersonicnozzlesimulation.
Parameter Value Unit
Workingfluid MM –
Totalinlettemperature 530.28 K
Total-to-staticpressureratio 1.84 – Inletcompressibilityfactor 0.64 –
Inletturbulenceintensity 0.05 –
andtheworkingfluidissiloxane MM.Table1reportsthemain simulationparameters.
Inordertoassesstheperformanceofthemethod,the computa-tionalcostofthenozzlesimulationrelyingontheug-LUTalgorithm fortheevaluationoffluidproperties(ug-LUTsim)iscomparedwith oneinwhichthepropertiesareprovidedtotheflowsolverbythe externalthermodynamiclibrarybasedontheSpan-Wagner EoS (SWsim),foranincreasingnumberofthermodynamicmeshnodes.
Fig.4ashowsthecomputationalcostofug-LUTsimasafunctionof themeshnodes,normalizedwiththecomputationalcostofSWsim.
Fig.4breportstheroot-mean-squareerror(RMSE)betweenthe flowfieldMachnumberofug-LUTsimwithrespecttoSWsimfor dif-ferentthermodynamicmeshrefinements.Asexpected,theRMSE valuedecreaseswiththe number ofthermodynamic mesh ele-ments,whereasthecomputationalcostshowstheoppositetrend.
Fig.5b shows a comparison of theMachnumber calculated atthenozzlecenterlinewithug-LUTsimandsimulation results inwhichfluidpropertiesareevaluatedwiththeideal-gasmodel (IGsim)andwithamodelbasedontheSpan-WagnerEoS(SWsim). ThestreamwiseMachdistributionobtainedwithug-LUTsimiswell inagreementwiththeresultsofSWsim.Asexpected,bothdeviate fromthedistributionobtainedwithIGsim,consideringthattheinlet compressibilityfactorsignificantlydepartsfromunity(Z=0.64).
Table2
Inputparametersforthe2Dturbulentturbinecascadesimulation.
Parameter Value Unit
Workingfluid MDM –
Totalinlettemperature 592.30 K
Total-to-staticpressureratio 1.26 – Inletcompressibilityfactor 0.598 –
3.2. Turbulenttransonic2Dturbinecascade
TheturbinecascadereportedinFig.6awassimulatedunder transonicconditions,inordertoevaluatetheperformanceofthe ug-LUTmethod incase ofRANS simulations.A hybridmesh of approximately40,000elementswasusedtodiscretizethe com-putationaldomain,withabout15,000quadsintheproximityof thebladesurfacetoensurey+≈1.Thesimulationparametersare
listedinTable2.ForthistestcaseMDMisconsideredasworking fluid.
Similarlytotheprevioustestcase,Fig.7reportsthesametrend intermsofcomputationalcostandRMSEbasedontheMachflow field.However,thecomputationalgainprovidedintheRANS simu-lationisapproximately4timeshigherascomparedtotheinviscid testcase.Fig.6bshowsthecomparisonbetweenthe dimension-less staticpressure,along theblade profile,fromtheIGsim, the SWsim,andtheug-LUTsim.TheresultsachievedwiththeSWsim arewellinagreementwithug-LUTsim,whilebothdifferfromthe onesobtainedwithIGsim.
Inordertofurtherinvestigatetheperformanceoftheproposed tabularmethod,thesameturbineconfigurationissimulatedwith thebinarymixtureMDM(85%)/MM(15%)asworkingfluid.Forthis testcase,thecostreductionisapproximatively5timeshigherthan thecomputationofthesingle-componentworkingfluid(Fig.8b), whileretainingthesameaccuracy(Fig.6a).Theseresultsshowthat
Fig.6. 2Dturbinecascadesimulationresults,obtainedwithapproximately15,000thermodynamicmeshnodes.(a)Machnumberdistributionwiththeug-LUTalgorithm. (b)BladepressuredistributionobtainedfromtheIGsim,SWsimandug-LUTsim.
Fig.7.2Dturbinecascadesimulationresults.(a)Normalizedcomputationalcostofthesimulationemployingthelook-uptablemethod(ug-LUTsim)comparedtothatofthe simulationobtainedusingtheSpan-Wagnerthermodynamicmodel(SWsim).(b)Relativemeansquareerror(RMSE)oftheMachfieldfromtheSWsimandug-LUTsim.The SWsimresultsaretakenasreference.
Fig.8.2DturbinecascadesimulationresultsoperatingwiththeMDM(85%)/MM(15%)mixture.(a)Bladepressuredistributionobtainedfromug-LUTsimandSWsim.(b) Comparisonbetweencomputationaltimeassociatedwiththesingle-componentworkingfluid(MDM)andtheMDM(85%)/MM(15%)mixture.Resultsarenormalizedusing thecomputationaltimeassociatedwiththeSWsim.
theuseoftheLuTmethodisevenmoreattractivewhenappliedto flowproblemsinvolvingmixtures.
3.3. Turbulent3Dsupersonicturbinecascade
Thesupersonic stator of the Organic Rankine Cycle turbine, documentedinRef.[27],isfinallyconsideredtoinvestigatethe computationalefficiencyoftheunstructured-basedlook-uptable methodfor three-dimensionalRANSsimulations.Thenumerical parametersofthetestcaseareprovidedinTable3.Thephysical meshconsistsofaboutonemillioncellsandthermodynamicgrid iscomposedbyapproximately20,000nodes.
Fig.9ashowsthecontourofthedensitygradient:acomplexflow patternofbothshock-wavesandfansispresentinthesemi-bladed region,duetothepost-expansionphenomena.Fig.9bdisplaysthe
Table3
Inputparametersforthe3DturbulentORCHIDturbinecascadesimulation.
Parameter Value Unit
Workingfluid MM –
Totalinlettemperature 573.15 K
Total-to-staticpressureratio 14.71 – Inletcompressibilityfactor 0.77 –
Inletturbulenceintensity 0.05 –
densityfieldrelativeerrorbetweentheug-LUTsimandtheSWsim. Thedeviationintheorderof0.1%pointsoutthat,evenwitha rela-tivelycoarsethermodynamicgrid,thetabularapproachisaccurate forthree-dimensionalproblemsinvolvingcomplexflow phenom-ena. Furthermore, thecomputationalcost reduction for the3D
Fig.9. 3Dturbinecascadesimulationresults.(a)Normalizeddensitygradientdistributionobtainedwiththeug-LUTalgorithm.(b)Densityrelativeerrorbetweenthe ug-LUTsimandtheSWsimresults,forapproximately15,000thermodynamicmeshnodes.
Fig.10.Summaryofthecomputationaltimefortheselectedtest-cases.Resultsare normalizedusingthecomputationaltimeassociatedwiththeSWsimandbasedon athermodynamicmeshofapproximately15,000nodes.
RANSsimulationisverysimilartotheanalysed2DRANStestcase, asshowninFig.10.
4. Performanceandmemoryassessment
Anequallyspacedstructuredgrid-basedLuTmethodwas imple-mentedwithinSU2,inordertoassesstheperformanceofug-LUT. Thestructured-basedLuTalgorithmwasconsideredforcarrying out a comparison in terms of computational costand memory requirementsbecauseofitssimpledatastructureandefficiency. Theturbinecascade,describedinSection3.2,isselectedas refer-encetestcasetoperformthisanalysis.Thenomenclaturesg-LUT andug-LUTisusedhereinaftertorefertothestructured-basedand theunstructured-basedLUTmethod,respectively.
4.1. Structured-gridLuTalgorithm|sg-LUT
ThestructuredgridLuT(sg-LUT)implementationfeaturesthe sameinterpolationmethodofug-LUT.Thermodynamicquery vec-tors,fortheCFDapplicationconsidered,are:(P,T),(P,),(P,s),(, T),(h,s).Byselectingthethermodynamicmeshasafunctionof pressureanddensity(Fig.11),thesearchingalgorithmisbasedon simplebinarysearchfor(P,T),(P,),(P,s),(,T),becausetheyhave atleastonecommoninputwithrespecttothermodynamicmesh. Akd-treeisusedforthe(h,s)pair.Fig.11showsanexampleof bothstructuredandunstructuredmeshofthermodynamicregion ofinterest,generatedusingthesamenumberofmeshnodes.
4.2. Comparisonsg-LUTvs.ug-LUT
Fig.12aandbreportsthenormalizedCPUtimeassociatedwith thesg-LUTsimandug-LUTsim.ThetotaltimeincludesboththeLuT pre-processingandthetotalCFDsolveriterationtime.Ascanbe noticed(Fig.12b),thepreprocessingtimebecomesarelevant frac-tionofthetotaltimeforug-LUTasopposedtosg-LUT.Thisisdue tothetrapezoidalmapgenerationforeachthermodynamicinput pair.Thisoperationisdonejustonceforsg-LUT,whencreatingthe kd-treerelativetothe(h,s)inputpair.
Theratiobetweenthetotalsimulationtimeobtainedbyug-LUT andsg-LUT(Fig.13a)indicatesthatug-LUTisfasterthansg-LUT, forthermodynamicmeshesthatareapproximatelycomposedbya numberofmeshnodeslowerthan10,000.Thesg-LUTisabout5% fasterthanug-LUTfor25,000thermodynamicmeshnodes.The ug-LUTperformanceisinagreementwiththecomputationalcostof LuTbasedonquad-treedatastructures,whosecomputationalcost hasbeenfoundtobe10%higherthanequallyspacedstructured tab-ulationmethods[13].Fig.13bshowsthecomparisonbetweenthe memoryrequirementsofug-LUTandsg-LUT.Theug-LUTmemory
Fig.11.Meshofthermodynamicregionofinterestfortheturbinecascadetestcase,asafunctionofthereduceddensityrandreducedpressurePr.(a)Exampleofstructured meshusedforsg-LUT.(b)Exampleofunstructuredmeshusedforug-LUT.
algorithmisusedasreferencevalue.(a)Computationaltimeofthesg-LUTalgorithm.(b)Computationaltimeoftheug-LUTalgorithm.
Fig.13.TotalCPUtimeandmemoryratiobetweenug-LUTandsg-LUT.(a)Computationaltimeratio.(b)Memoryrequirementsratio.
Fig.14.Relativemeansquareerrorratiobetweensg-LUTandug-LUT.(a)RMSEratiooftheconservativevariables.(b)RMSEratioofpressureandtemperature.
requirementsare higherthan sg-LUT mainlyduetothe follow-ingreasons:(i)inug-LUTthetrapezodialmapsarecreatedforall thermodynamicinputpairs;(ii)forug-LUTtheunstructured-mesh connectivityhastobestored.Forpracticalapplications,however, sincethermodynamicmeshesfeaturingaround10,000elements aredeemedsufficientfortherequiredlevelofaccuracy,the abso-lutememoryassociatedneverexceeded200Mb.Furthermore,for problems discretized onlarge domains both the preprocessing computationalcostandthememoryburdenareexpectedtobea negligiblefractionwhencomparedwiththeCPUtimeandmemory requirementsoftheCFDsimulation.
Finally,acomparativeassessmentoftheRMSEwithrespectto theSWsimiscarriedoutforbothug-LUTandsg-LUT.Fig.14depicts theratiobetweentheRMSEobtainedbyug-LUTandsg-LUTrelative totheconservativevariables,
v
1,v
2,e(Fig.14a),pressureandtemperature(Fig.14b).TheRMSEiscalculated,asshowninSection
3,withrespecttoSWsim.Theug-LUTalgorithmismoreaccurate thansg-LUT, forthefluxes
v
1,v
2,e,andthepressure whiletheoppositeoccurswithregardtothedensityandtemperature. Withoutbeingexhaustive,theseresultsindicatethatunstructured tabularmethodsmaybeadvantageouswhenitcomestoaccuracy
ascomparedtostructuredgridscharacterizedbythesamenumber ofnodesandlevelofrefinement.
5. Conclusions
This paper documents the ug-LUT method, a novellook-up table method that can be used to improve the computational performance in non-ideal compressible fluid dynamics (NICFD) simulations. The methodis based onan unstructured mesh in combination witha trapezoidal-map searchingalgorithm and a piece-wiseinterpolationmethodbasedonthedualityapproach. Thealgorithmwassuccessfullyimplementedintheopen-source codeSU2anditsperformanceassessedinthreeparadigmaticNICFD cases:(1)aninviscid2Dsupersonicnozzle;(2)a2DRANS tran-sonicturbinecascade;(3)a3DRANSsupersonicstatorrow.Inall cases,thermodynamicpropertymodelofreferenceisbasedona multi-parametertechnicalequationofstate.
Theoutcomeofthisstudycanbesummarizedasfollows: • The ug-LUT methodprovides a computationalcost reduction
directlybymeansofanexternalfluidpropertylibraryof approx-imatelyoneorderofmagnitudeforRANScomputations,whereas itistwicelessexpensiveincaseofinviscidsimulations. • Theaccuracylevelwasfoundtobesatisfactory(RMSE<0.01%)for
engineeringapplications,withasimplelinearinterpolationand arelativelycoarsethermodynamicgrid(oftheorderof15,000 elements).
• Themethodisveryefficientforflowsimulationsinvolving mix-tures as working fluids, for which direct calculation of fluid propertiesmightbeprohibitive.Therelativecomputationalgain, fortheanalyzedtestcase, isfivetimeshigherifcomparedto simulationsinvolvingpurefluids.
• ug-LUTcanberegardedasanalternativealgorithmtostructured LuTmethods,providingthepossibilityofusingmeshrefinement andfeaturingcomparableperformanceandaccuracy.
Currentworkisfocusedonextendingtheug-LUTmethodto enableautomaticdifferentiationoftheLuTforadjoint-basedshape optimization of NICFD problems and to allow its use in other demandingsimulations,likedynamicsystemsimulationsofenergy conversionsystems.
Acknowledgements
ThisresearchhasbeensupportedbyRobertBoschGmbHand theAppliedandEngineeringSciencesDomain(TTW)oftheDutch OrganizationforScientificResearch(NWO),TechnologyProgram oftheMinistryofEconomicAffairs,grantnumber13385.
AppendixA.
Here,thepseudo-codesofthealgorithmsusedforthe Trape-zoidalMappresentedinSec.2.2arereported.
Algorithm1. BuildTrapezoidalMapis.
1:input:listofuniqueedges:Edges;
2:listofedgetofaceconnectivities:EdgeToFace; 3:listofthex-coordinatesoftheedges:xsamples; 4:listofthey-coordinatesoftheedges:ysamples;
5:output:listofuniquexbandsthroughwhichtosearch:XBands; 6:listofconnectivityofedgestoagivenuniquex-band(orderbyy-valueof edgeatmiddleofband):YWithinBands;
7:FilteroutverticaledgesfromXsamplescreatinguniquelist:xBands; 8:foreachbandbinXBandsdo
9: foreachedgeeinEdgesdo
10:ifeintersectsbthenAddetoYWithinBands 11:endif
12: endfor
13: SorttheedgesinYWithinBandsaccordingtotheyvalueoftheedgeinthe centeroftheband
14:endfor
15:return:XBands,YWithinBands;
Algorithm2. TrapezoidalMapis.
1:input:2Dquerypoint(whattosearchfor):x,y; 2:listofedgetofaceconnectivities:EdgeToFace; 3:listofuniquexbandsthroughwhichtosearch:XBands;
4:listofconnectivityofedgestoagivenuniquex-band(orderedbyy-valueof edgeatmiddleofband):YWithinBands;
5:output:theindexofthefaceinwhichthequerypointlies:CF; 6:
7:UsebinarysearchtofindbandbinXBandswhichcontainsx;
8:Withinbandbuseabinarysearchtofindedgee1(belowthequerypoint) ande2(abovethequerypoint);
9:Useinterpolationtocheckifedgeisbeloworabovethequerypoint; 10:ThecontainingfaceCFisgivenbytheintersectionoftheedgetoface connectivitiesofe1ande2;
11:return:CF;
References
[1]P.Colonna,E.Casati,C.Trapp,T.Mathijssen,J.Larjola,T.Turunen-Saaresti,A. Uusitalo,Organicrankinecyclepowersystems:fromtheconcepttocurrent technology,applications,andanoutlooktothefuture,J.Eng.GasTurbines Power137(10)(2015)100801.
[2]Y.Kim,C.Kim,D.Favrat,TranscriticalorsupercriticalCO2cyclesusingboth
low-andhigh-temperatureheatsources,Energy43(1)(2012)402–415. [3]J.Ahamed,R.Saidur,H.Masjuki,Areviewonexergyanalysisofvapor
compressionrefrigerationsystem,Renew.Sustain.EnergyRev.15(3)(2011) 1593–1600.
[4]B.P.Brown,B.M.Argrow,ApplicationofBethe–Zel’dovich–Thompsonfluidsin organicRankinecycleengines,J.Propuls.Power16(6)(2000)1118–1124. [5]P.Colonna,N.Nannan,A.Guardone,T.VanderStelt,Onthecomputationof
thefundamentalderivativeofgasdynamicsusingequationsofstate,Fluid PhaseEquilib.286(1)(2009)43–54.
[6]G.Gori,1stInternationalSeminaronNon-IdealCompressible-FluidDynamics forPropulsion&Power,821(1,2017,pp.011001.
[7]S.Bahamonde,M.Pini,C.DeServi,A.Rubino,P.Colonna,Methodforthe preliminaryfluiddynamicdesignofhigh-temperaturemini-organicrankine cycleturbines,J.Eng.GasTurbinesPower139(8)(2017)082606. [8]M.Pini,G.Persico,D.Pasquale,S.Rebay,Adjointmethodforshape
optimizationinreal-gasflowapplications,J.Eng.GasTurbinesPower137(3) (2015)032604.
[9]M.Pini,A.Spinelli,G.Persico,S.Rebay,Consistentlook-uptableinterpolation methodforreal-gasflowsimulations,Comput.Fluids107(2015)178–188. [10]P.Boncinelli,F.Rubechini,A.Arnone,M.Cecconi,C.Cortese,Realgaseffectsin
turbomachineryflows:acomputationalfluiddynamicsmodelforfast computations,J.Turbomach.126(2)(2004)268–276.
[11]M.Dumbser,U.Iben,C.D.Munz,Efficientimplementationofhighorder unstructuredWENOschemesforcavitatingflows,Comput.Fluids86(2013) 141–168.
[12]M.DeLorenzo,P.Lafon,M.DiMatteo,M.Pelanti,J.-M.Seynhaeve,Y. Bartosiewicz,Homogeneoustwo-phaseflowmodelsandaccurate steam-watertablelook-upmethodforfasttransientsimulations,Int.J. Multiph.Flow.(2017).
[13]G.Xia,D.Li,C.L.Merkle,Consistentpropertiesreconstructiononadaptive cartesianmeshesforcomplexfluidscomputations,J.Comput.Phys.225(1) (2007)1175–1197.
[14]Ø.Wilhelmsen,A.Aasen,G.Skaugen,P.Aursand,A.Austegard,E.Aursand, M.A.Gjennestad,H.Lund,G.Linga,M.Hammer,Thermodynamicmodeling withequationsofstate:presentchallengeswithestablishedmethods,Ind. Eng.Chem.Res.56(13)(2017)3503–3515.
[15]K.Yiu,D.Greaves,S.Cruz,A.Saalehi,A.Borthwick,Quadtreegridgeneration: informationhandling,boundaryfittingandCFDapplications,Comput.Fluids 25(8)(1996)759–769.
[16]F.Palacios,J.Alonso,K.Duraisamy,M.Colonno,J.Hicken,A.Aranake,A. Campos,S.Copeland,T.Economon,A.Lonkar,etal.,StanfordUniversity Unstructured(SU2):anopen-sourceintegratedcomputationalenvironment formulti-physicssimulationanddesign,51stAIAAAerospaceSciences MeetingIncludingtheNewHorizonsForumandAerospaceExposition(2013) 287.
[17]T.D.Economon,F.Palacios,S.R.Copeland,T.W.Lukaczyk,J.J.Alonso,SU2:an open-sourcesuiteformultiphysicssimulationanddesign,AIAAJ.54(3) (2015)828–846.
[18]M.Pini,S.Vitale,P.Colonna,G.Gori,A.Guardone,T.Economon,J.Alonso,F. Palacios,SU2:theopen-sourcesoftwarefornon-idealcompressibleflows,J. Phys.Conf.Ser.821(2017)012013.
[19]A.Ghidoni,E.Pelizzari,S.Rebay,V.Selmin,3Danisotropicunstructuredgrid generation,Int.J.Numer.MethodsFluids51(9-10)(2006)1097–1115. [20]P.Colonna,T.VanderStelt,Fluidprop:AProgramfortheEstimationof ThermoPhysicalPropertiesofFluids,EnergyTechnologySection,Delft UniversityofTechnology,Delft,TheNetherlands,2018,
http://www.FluidProp.com.
[21]P.Colonna,N.Nannan,A.Guardone,E.W.Lemmon,Multiparameterequations ofstateforselectedsiloxanes,FluidPhaseEquilib.244(2)(2006)193–211. [22]M.DeBerg,M.VanKreveld,M.Overmars,O.C.Schwarzkopf,Computational
Geometry,Springer,2000,pp.1–17.
[23]M.B.Giles,N.A.Pierce,Anintroductiontotheadjointapproachtodesign, FlowTurbulenceCombust.65(3)(2000)393–415.
[24]S.Vitale,G.Gori,M.Pini,A.Guardone,T.D.Economon,F.Palacios,J.J.Alonso, P.Colonna,ExtensionoftheSU2opensourceCFDcodetothesimulationof turbulentflowsoffluidsmodelledwithcomplexthermophysicallaws,22nd AIAAComputationalFluidDynamicsConference(2015)2760.
[25]M.Vinokur,J.-L.Montagné,Generalizedflux-vectorsplittingandroeaverage foranequilibriumrealgas,J.Comput.Phys.89(2)(1990)276–300. [26]B.VanLeer,Towardstheultimateconservativedifferencescheme.v.a
second-ordersequeltoGodunov’smethod,J.Comput.Phys.32(1)(1979) 101–136.
[27]M.Pini,C.DeServi,M.Burigana,S.Bahamonde,A.Rubino,S.Vitale,P. Colonna,Fluid-dynamicdesignandcharacterizationofamini-orcturbinefor laboratoryexperiments,EnergyProc.129(2017)1141–1148.