I am trying to give a sinusoidal vibrational effect on gas phase and solid phase in a fluidized bed(2D TFM).
There will be a displacement due to vibration,
displacement, d = A * sin(2 * pi * f * time)
A: amplitude
f: frequency
and the second derivative of vibrational displacement will be vibrational acceleration.
vibrational acceleration, a = 4 * pi^2 * f^2 * A * sin(2 * pi * f * time)
Using this vibrational acceleration, I want to modify the gravity term in the momentum equation for both gas and solid phases.
g_modified = gravity - a
My question is, can anyone give me some advice/guidance on developing the udf file?
I think the approach is using “usr1.f” and change the GRAVITY_X, GRAVITY_Y, and GRAVITY_Z.
Can anyone share some example on this?
I was working on UDF file for applying vibration effect.
There is too short description in MFIX web at 8.2. User-Defined Functions.
Is there any step by step UDF tutorial I can check?
SUBROUTINE USR1
Use usr
Use run
USE constants
IMPLICIT NONE
!-----------------------------------------------
!
! Include files defining common blocks here
!
! Define local variables here
!
!
! Include files defining statement functions here
CALL_USR = .TRUE.
CONSA = 0.0027 ! Vibration amplitude
CONSW = 87.1478 ! Vibration angular frequency
SUMA = -CONSA*CONSW*CONSW*SIN(CONSW*TIME)
GRAVITY_Y = GRAVITY_Y - SUMA
RETURN
END SUBROUTINE USR1
And my question is,
I want to give gravity_y term for both solid & gas phase like shown in attached file.
How can I give gravity_y term for both phases(with fraction and density as well) in the usr1.f?
gravity_y applies to both gas and solids phases. You don’t need to touch the volume fraction and density in usr1.f, this will be handled automatically.
Where are these legacy tutorials stored now? A simple search for “legacy_tutorials” and “DEM_Wall_HT” comes up with nothing, at least in the mfix-19.3.1 anaconda directory. All the tutorials I’m seeing are new.
On the Download page, please go to the “Source/Pip” tab and download the tarball. This contains all source code and legacy tests/tutorials. These are not guaranteed to run in the GUI, you may need to run from command line.