Академический Документы
Профессиональный Документы
Культура Документы
ChristopherBell
12thgrade,GlenelgCountrySchool,EllicottCity,MD
Introduction
Problem
AnSPHsimulationconsistsoffourprimarystages:asearchforandstorageofthe neighboringparticleswithinacertainradiusforeveryparticle,theinterpolationand summationofforcesanddensityamongtheneighboringparticles,anupdateofthe velocitiesandpositionsofeachparticle,andthereconstructionandupdateofthespatial indexingcontainerusedtolocatealloftheneighboringparticles.SPHsimulationswhich utilizealargenumberofparticlesthereforeproducemoreaccuraterepresentationsof fluids,aseachparticlemayrepresentasmallerportion dV ofthesimulatedfluidvolume. However,simulationswithlargeamountsofparticlesaredifficulttoproduceinrealtime andareCPUintensivetorun.ThisoftenlimitsSPHsimulationswithlargeamountsof particlestooffscreenrenderingapplicationssuchasmovieeffects.
Purpose
ConstantsUsedinSimulation
Property Timestep SimulationTime Temperature RestDensity DynamicViscosity SurfaceTension GasStiffness #KernelParticles GravitationalAcceleration SEEThreshold
Symbol t t T o k x g SEEthresh
.05
SimulationProcedure
Preliminaryresearchshowedthatinsufficientempiricaldataregardingthekineticenergyof
waterexisted.Therefore,Inordertoproduceanexpectedgraphofthekineticenergyof anyfluidoveraperiodoftime,theassumptionthat 613 particlesmodeledreallife accuratelyenoughforthemajorityofapplicationswasmade.Thevolumeofthesimulated fluidwaschosentobe .01m3 tominimizepotentialerrorcausedbysimulatinglarge volumesofwater.Eachsimulationwasruninsidea 1m3 containerwitharestitutionof0.55 simulationswith i3 particleswererun,where i = 5 forthefirstsimulationupuntil i = 61 . Themassofeachparticlevariedwiththetotalnumberofparticles N ,andwasthus
V calculatedusing mi = o N aseachparticlerepresentedasmallportionofthefluidvolume.
3V x .ThesimulationsweredevelopedinC++usingacombinationofthe 4n
GraphingProcedure
KE
wasgeneratedandplottedonthesamepapertoimprovevisualization.Anexponential regressionlinewascalculatedinExcelforthescatterplotofthe est todetermineanexact xvaluewherethenumberofparticlesusedcausedan est of5%ofthedifferencebetween themaximumandminimum est valuesplusthe est ofthesimulationwith 603 particles (explainedlater).
Analysis
Asillustratedbythegraphofscaled K E valuesovertime,eachsimulationappearedto approachanintrinsicamountofsimulationaccuracyas N increased.Whenan thresh value of5%ofthevalue max.est. min.est.+1 addedto min.est.+1 waschosenandsubstitutedfory intheregressionequation,thecorrespondingnumberofparticlesxwasfoundtobe 219323particles.The min.est.+1 valuecorrespondingtothesecondtolastcalculated min.est. valuewasusedinthecalculationofthethresholdsincetheregressionlinecannot modeldatawithayvalueof0,ortheactual min.est.+1 .Thismeantthatiftheassumptionthat 613 particlesaccuratelymodeledwaterinreallifewastrue,thesimulationwith 219323 numberofparticleswouldhaveminimizedits est to5%ofthe SEE rangeofalltested simulationsplus min.est.+1 onlyifassumedthatthe 53 simulationrepresentedthesimulation withthelargestamountoferrorinallsimulationswith N rangingfrom 1 61 usingthe sameparameters.
ThoughtsOnFutureWork
of1millionparticleswhileminimizingthe SEE to5%ofthe SEErange plus min.est.+1 ,itshould chooseamaximum N valueof1millionandaminimum N valuecorrespondingtothe lowestamountofparticlesitcansimulate.Careshouldbetakenwhenlowering N ,asSPH simulationsrelyonlargenumbersofparticlestosimulateafluidasintendedandalow N valuemaycauseunexpectedsimulationresults.
Credits