AcuTrace User-Defined Functions Manual

Instructions to define additional solution quantities of AcuTrace called user equations.

AcuTrace is a particle tracer that runs as a post-processor to or a co-processor with AcuSolve. AcuTrace computes particle traces as a series of segments using a fifth-order time-discontinuous Galerkin (TDG) method with error control for solving ordinary differential equations. AcuTrace typically solves for particle position and, optionally, particle stretch.

The user equations are governed either by evolution equations of the form


or by evaluation equations of the form


where s p MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9 vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaWaa8Hcaeaaca WGZbaacaGLrdcadaWgaaWcbaGaamiCaaqabaaaaa@39C5@ is the set of user defined particle variables in the current equation, S p MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9 vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaWaa8Hcaeaaca WGtbaacaGLrdcadaWgaaWcbaGaamiCaaqabaaaaa@39A5@ is the set of user defined variables from the other user equations (if any), U f MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9 vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaWaa8Hcaeaaca WGvbaacaGLrdcadaWgaaWcbaGaamOzaaqabaaaaa@399D@ is the set of flow variables, and V u d f MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9 vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaWaa8Hcaeaaca WGwbaacaGLrdcadaWgaaWcbaGaamyDaiaadsgacaWGMbaabeaaaaa@3B81@ is the set of user equation parameters. User-defined functions are used to define the right hand side of these additional evolution and evaluation equations.

Two steps are needed to use user-defined functions:
  • Build a user-defined function
  • Reference it in the input file

User-Defined Functions in AcuTrace are referred to as UFPs (for User-Defined Function Particle) to differentiate them from the UDFs used in AcuSolve.

Any number of user-defined functions may be used in a given problem. As further explained below, the user defined functions are compiled and linked into one or more dynamic shared libraries. The script acuMakeLib on Unix/Linux machines and acuMakeDll on Windows machines may be used for this purpose. A list of these libraries is then given to AcuTrace via the configuration option user_libraries. The solver then sequentially searches through these libraries for the user-defined functions referenced in the input file.