How to obtain the outlet solid phase mass flow rate and gas phase velocity from the monitor, and add them to the inlet mass inlet boundary conditions?

I currently use TFM to simulate an example of a riser. I want to use UDF to calculate the particle flow rate at the outlet of the riser, and set the calculation result as the boundary condition of the quality inlet of the return port.
Through the tutorial, I found that the monitor can easily get the mass flow rate.
So,my idea is to set the inlet boundary conditions in user1.f, give a mass flow rate in the first few seconds, and then set the mass flow rate calculated by the monitor to the solid phase mass flow in the outlet.
My question: monitor_rop_s(1,1) and monitor_u_g(2) are logical types and cannot be assigned to BC_massflow_s(5,1) and BC_u_g(5)
The variable calling relationship obtained through the software is shown below, but the formula for the monitor to calculate the mass flow rate is not found.


Do you have any good solutions? Thanks !
My case and user_1.f are as follows:
usr1.f (2.6 KB)
riser.mfx (13.6 KB)

The monitor_* keywords are Boolean (logical) as you mention. They control whether various quantities (temperatures, densities, etc) are monitored and written to files. That’s all they do, they control whether the associated monitor is on or off.

There’s also a monitor_type which regulates how the monitor is computed, note that these are not just raw values from the model (unless it’s a single-point monitor), but rather statistical properties (max, min, avg, sigma, etc) over a defined region. All of the code that does these computations is in the model/monitors directory, it’s a bit complex because of the various monitor types.

I don’t think you really need to use the monitor approach, however. You can access the arrays rop_s and u_g directly in your code, you just need to have

   USE fldvar

in your code. Or to be more careful about possible name collisions

    USE fldvar, only: rop_s, u_g

– Charles

2 Likes

The flowrate is computed in monitors/flowrate_des.f90 in the function monitor_flowrate_des (which isn’t showing up in your diagrams for some reason)

1 Like

Hai,Has your problem been solved? What is your final solution? I changed it according to the reply, but it still makes mistakes. Do you have a good plan? thank you