Define a variable velocity inlet boundary

I want to define a variable velocity inlet boundary in MFIX 21.2, the total computation time t is 20 seconds, when 0 < t < 0.5s, velocity u=0, when 0.5 < t < 20s, velocity u=0.02m/s. Can I modify it directly in the project file? As shown in the figure below.

I’m not sure I completely understand your question, but you should be able to set bc_u_s to 0, run the model to a simulation time t=0.5, then set bc_u_s to the desired 0.02 and resume the run.

– Charles

Thank you!I will try it.

While the model is in ‘paused’ or ‘resumable’ state, certain controls in the GUI are enabled and others are disabled. The disabled controls are ones that it does not make sense to change (e.g. initial conditions, or overall geometry). The BCs should be editable while you are in “paused” or “stopped/resumable” state. You can edit the project file directly, but there should not be any need to do so, because the controls that are disabled in the GUI are ones you shouldn’t change anyhow. If there’s something that you are doing by editing the file that’s not allowed in the GUI, I’d like to know about it.

– Charles

You can directly define an updated velocity with time and the udf is feasible in the forum.
Just give you my udf for reference. Note the inlet boundary ID is 2. usr1.f (2.6 KB)

Thank you very much!

Based on your UDF, I rewrote a UDF that compiled properly in MFIX and built a new solver. However, when the calculation time exceeds 0.05s, the inlet boundary 2 is the same as the initial boundary, and no substance enters.


usr1.f (408 Bytes)
2d_fluidbed.mfx (19.9 KB)

I checked your PDF and found you assign time value to t variable you defined.
you could add t = time after its defination.

Please check out the 2D TFM pulsating fluidized bed example. You can load the setup from the GUI, build the custom solver and run. This one uses a keyframe data file data_kf_0001.txt to define the velocity vs time profile.

Thank you. I will try it.

If t=time, it will get an error at compile-time, can not create a solver.

Thank you very much! I have looked through the data file data_kf_0001.txt, But I just need to set up inlet_2, I don’t know how to do that. Besides, I wonder why this is not possible with a UDF.

This can be done with a UDF, the keyframe data is actually implemented through UDFs. I was suggesting to study the pulsating fluidized bed as an example and adapt it to your simulation. You can set it up for any BC ID.