# 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)
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)

---------------------------------- 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,

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},
)

# 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},
)