Could anyone provide insights on the following issue?

I am exploring ideas for data assimilation to predict the velocity field across a three-dimensional domain using non-steady advection-diffusion equations from spatiotemporal concentration field changes.

Currently, the approach involves using spatiotemporal concentration data as constraints and residual errors from advection-diffusion equations, Navier-Stokes equations, and continuity equations.

Regarding boundary conditions, inflow conditions are set based only on concentration values, with unknown velocity values and flow rates. However, the no-slip condition on walls is included as a constraint.

I am interested in incorporating integral continuity to conserve flow rates as additional constraints at inflow and outflow boundaries. How should these constraints be set when specific flow rate values are unknown? (An example of integral continuity constraint from the example includes a specific flow rate value of 2.54.)

The ideal approach would involve calculating cross-sectional flow rates from predicted velocities and enforcing those values to be conserved.

Problem:
You’re right, suppose that you have a T-junction and you plan to define an integral constraint to have integral continuity but you don’t have information about the values of volume flow rates.

Solution:
I personally wrote a mesh-based integral constraint which get normals and anrea of each surface meshes from inlet and outlet then using normal_dot_vel we can calculate u.n dA for each mesh surface then if we do a summation over all surface meshes of our boundaries, the result should be zero.
For transient problems:
for transient problems, the summation of volume flow rates at each time should be zero.

For T-junction example:

Q1+Q2+Q3 = 0 since that we use normals of surface meshes.

Thank you for your valuable advice.
Your suggestion makes physical sense, but I’m not sure how to implement your solution regarding the modulus.
If you have any example code, could you please share that part with me?
I would greatly appreciate your help.

I can share a class that I have implemented for mesh based integral boundary condition but I don’t know how to share. In the present integral boundary condition, the Modulus uses a Monte Carlo method for integration based on stl file but I personally like to work with unstructured mesh, that’s why I implemented the new class. @mnabian how can I share the code with this user?

I greatly appreciate your kindness.
Do you have a GitHub account?
If you have committed to a public branch, I would be able to review your implemented code.
Thank you for your help.