1©2015ANSYS,Inc.June7,201516.0ReleaseAgendaUserDefinedFunctionsinANSYSFluent2©2015ANSYS,Inc.June7,2015Welcome!WelcometotheAdvancedANSYSFLUENTUDFtrainingcourse!ThistrainingcoursecoversthetopicsofhowtocustomizeANSYSFLUENTviauser-definedfunctionsItisintendedforexperiencedANSYSFLUENTusersCourseObjectives:–WhyandhowtocustomizetheFLUENTsolver–IntroductiontotheFLUENTdatastructureandutilitymacros–Introductiontothetop-levelmacrosforaccessingFLUENTdata–PowerCFDprogrammingwithuser-definedscalarsanduser-definedmemories–ParallelizingUDFs–WorkbenchParametersandUDFs–Accessingthedatastructureinmultiphasemodels3©2015ANSYS,Inc.June7,2015Agenda8:30–9:30Lecture1–IntroductionandFLUENTDataStructure9:30–9:45Lecture2–CompilationandInterpretation9:45–10:00Break10:00–11:00Lecture3–UDFComposition11:00–12:00Tutorials12:00–1:00Lunch1:00–1:30Lecture4–UserDefinedMemoriesandScalars1:30–2:15Tutorials2:15–3:00Lecture5–ParallelizingUDFs3:00–3:30Lecture6–WorkbenchParametersandUDFs3:30–4:30Tutorials4:30–5:00Lecture7–UDFsforMultiphaseFlow(optional)Lecture8–UDFsfortheDiscretePhaseModel(optional)4©2015ANSYS,Inc.June7,2015TableofContents1.IntroductionL1-11.IntroductionL1-22.BasicsofUDFsL1-63.IntroductiontotheCProgrammingLanguageL1-124.CFDProgramminginFLUENTandDatastructuresL1-232.CompilationandInterpretationofUDFsL2-11.CompilationversusinterpretationL2-22.CompilingwithintheWorkbenchL2-63.ComposingUDFsL3-11.DEFINE_PROFILEL3-22.DEFINE_SOURCEandsourcetermsL3-103.DEFINE_INITL3-154.DEFINE_ADJUSTL3-185.DEFINE_EXECUTE_AT_ENDL3-206.DEFINE_PROPERTYL3-227.DEFINE_ON_DEMANDL3-268.DEFINE_DELTATL3-289.AdditionalMacrosL3-3110.Appendix:User-definedI/OfunctionsL3-344.User-definedScalarsandUser-definedMemoriesL4-11.UDML4-22.UDSL4-43.GradientVectorMacroL4-115.ParallelizingUDFsL5-11.IntroductionL5-22.ParallelFLUENTArchitectureL5-43.ExampleProblemL5-54.PartitioningL5-105.LoopingMacrosL5-126.GlobalReductionL5-167.Inter-processCommunicationsL5-208.NecessitytoParallelizeaUDFL5-259.TroubleshootingL5-2810.SummaryL5-306.WorkbenchParameterandUDFL6-11.InputParameterinUDFL6-32.ReportOutputParameterL6-63.OutputParameterDefinedwithinUDFL6-77.UDFsforMultiphaseModels(optional)L7-11.AdditionalDataStructureandMulti-domainconceptL7-32.Domain/ThreadStructureL7-43.LoopingmacrosforMultiphaseL7-134.Somemultiphase-specificDEFINEmacrosL7-158.UDFsfortheDiscretePhaseModel(optional)L8-1