Integral Continuity in Aneurysm

Hello,

I will create a new CFD model based on Aneurysm example and have 2 questions about the constraint of outvar ‘integral_continuity’.

*Environment
Simnet version : 21.06

*Questions

  1. Is the value of ‘integral_continuity’ calculated in IntegralContinuity.make_node() in navier_stokes.py?
    If it was wrong, please let me know where it is calculated.

  2. Why is the constraint value of ic_2 integral_continuity negative(-2.540) as line 119 in aneurysm.py?
    I think the value should be positive(2.540) so that it is equivalent as ic_1.

---------------------------------- aneurysm.py ------------------------------------

112 # Integral Continuity 1
113 ic_1 = outlet_mesh.boundary_bc(outvar_sympy={‘integral_continuity’: 2.540},
114 lambda_sympy={‘lambda_integral_continuity’: 0.1},
115 batch_size_per_area=128)
116 self.add(ic_1, name=“IntegralContinuity_1”)
117
118 # Integral Continuity 2
119 ic_2 = integral_mesh.boundary_bc(outvar_sympy={‘integral_continuity’: -2.540},
120 lambda_sympy={‘lambda_integral_continuity’: 0.1},
121 batch_size_per_area=128)
122 self.add(ic_2, name=“IntegralContinuity_2”)

---------------------------------- aneurysm.py ------------------------------------


Thanks,
Toshiaki Yokoi

Hi Toshiaki,

  1. That is correct. The integral continuity value is calculated in IntegralContinuity.make_node().
  2. This is because for the second integral continuity plane, the plane normal is in the opposite direction of the flow, but the plane normal for the first integral continuity plane is in the flow direction.

Hi Mnabian-san,

Thank you for your reply.

  1. That is correct. The integral continuity value is calculated in IntegralContinuity.make_node() .

understood.

  1. This is because for the second integral continuity plane, the plane normal is in the opposite direction of the flow, but the plane normal for the first integral continuity plane is in the flow direction.

I have a new question.
Where is the normal direction of the second plane written?
Could you please let me know how to understand that the normal is in the opposite direction of the flow?


Thanks,
Toshiaki Yokoi

@mnabian Hi, If we plan to reconstruct the field and we didn’t know the value of flow rate, can we define a loss term based on equality of volume flow rate of outlet and inlet based on integral constraint? How?

The string value “integral_continuity_1” seems to be repeated in both IC1 and IC2 on GitHub, is this a mistake? @mnabian

The code by @yokoi.toshiaki doesn’t have it repeated.

What’s interesting is that the code from GitHub did seem to replicate the figure in the documentation accurately, but I wonder if this is the result of a mistake (or maybe it doesn’t affect the output too much, but it could be a typo nonetheless).

Thank you for your help.

  # Integral Continuity 1
    integral_continuity = IntegralBoundaryConstraint(
        nodes=nodes,
        geometry=outlet_mesh,
        outvar={"normal_dot_vel": 2.540},
        batch_size=1,
        integral_batch_size=cfg.batch_size.integral_continuity,
        lambda_weighting={"normal_dot_vel": 0.1},
    )
    domain.add_constraint(integral_continuity, "integral_continuity_1")

    # Integral Continuity 2
    integral_continuity = IntegralBoundaryConstraint(
        nodes=nodes,
        geometry=integral_mesh,
        outvar={"normal_dot_vel": -2.540},
        batch_size=1,
        integral_batch_size=cfg.batch_size.integral_continuity,
        lambda_weighting={"normal_dot_vel": 0.1},
    )
    domain.add_constraint(integral_continuity, "integral_continuity_1")

See permalink below:

1 Like

Hi @yokoi.toshiaki,
I found a helpful way to visualize the normal direction using Blender. For the integral plane, the plane normal indeed points opposite to the flow direction, as @mnabian suggested. This explains the opposing signs applied to the constraints for the two planes.

The term normal_dot_vel is a little confusing; it actually represents the flow rate (calculated as area * velocity). Here’s the calculation breakdown:
Q=inlet_area *v_avg
Q= 21.1284 * (scale**2) * (u_max/2)
Q=2.540
This follows from the fact that, in a fully developed parabolic velocity profile, the average velocity is half of the maximum (centerline) velocity

1 Like