On Apr 12, 2025, at 1:50 AM, 陈奕纯 <a1185...@gmail.com> wrote:Thanks!So if I set up a 2D-structure with a closed-curve gemotry using springs and beams (for example, a circle that can deform), which has x times the mass density of the background flow in a 2D computation, then the boundary mass should be set x*RHO*area_of_the_closed_curve/perimeter_of_the_closed_curve ?
Do I and when do I need to swich to IBFE for codimension-0 structure instead of using only vertexes for its boundary?
On Apr 15, 2025, at 11:13 AM, 陈奕纯 <a1185...@gmail.com> wrote:Thanks so much for the reply!I meant a codimension-0 case. For example, a 2D cylinder in a 2D domain. I use N vertexes to form a circle with radius R and I want this cylinder to have X times the mass density of the background flow. Do I set the boundary mass density to be (X-1)*RHO*(pi*R^2)/(2*pi*R) ?
Besides, if I want to add gravity, do I simply add "ForcingFunction" attribute to the input file and set function_1 = "-9.8*RHO"?
I tried this and I found the calculation threw error of "time step size changed". Does adding gravity makes the calculation more unstable and requires smaller time step size?
在2025年4月12日星期六 UTC+8 21:13:18<Boyce Griffith> 写道:Please reply to the list.On Apr 12, 2025, at 1:50 AM, 陈奕纯 <a1185...@gmail.com> wrote:Thanks!So if I set up a 2D-structure with a closed-curve gemotry using springs and beams (for example, a circle that can deform), which has x times the mass density of the background flow in a 2D computation, then the boundary mass should be set x*RHO*area_of_the_closed_curve/perimeter_of_the_closed_curve ?I am a little confused - is this a codimension-1 or codimension-0 case?In the codimension-0 case, then the default behavior of the IB method (without using pIB) is for the structure to be neutrally buoyant: the mass density of the structure is the same as the mass density of the fluid. Using the pIB method in this case will only allow you to make the mass density of the structure larger than the mass density of the fluid.In the codimension-1 case, then the default behavior of the IB method (without using pIB) is for the structure to be massless. In fact, there is no way for the fluid and structure to have the same pointwise mass densities, because the units are not compatible. To make things concrete, let’s consider a 2D surface immersed in a 3D fluid. Mass density for the structure has units of mass/area. Mass density for the fluid has units of mass/volume.If you want to view the codimension-1 case as a reduced-order model for the codimension-0 case, like what you would do in a shell theory, then you could assign some thickness to the surface and use that to define the relevant volume element. However, if you wanted to make the mass density of this shell the same as the fluid, you still would not want to use the pIB method, because the mass associated with the shell is already accounted for in the Eulerian momentum equation.Do I and when do I need to swich to IBFE for codimension-0 structure instead of using only vertexes for its boundary?You can model codimension-0 structures with either IB or IBFE. The main reason to use IBFE method is because it makes it much easier to use standard continuum mechanics models and meshes from standard mesh generator tools.在2025年4月12日星期六 UTC+8 04:40:27<Boyce Griffith> 写道:
> On Apr 10, 2025, at 11:39 AM, 陈奕纯 <a1185...@gmail.com> wrote:
>
> i'm currently using IB and want to use pIB, and i found that i can simply apply mass in input file by adding uniform_bdry_mass.
> I am confused about the unit of the bdry_mass_density. In an example input2d file, it is written as follow
> uniform_bdry_mass = bdry_mass_density*ds
> the comment for bdry_mass_density is "g cm^-1". If I want the strcuture to have the same or x times the mass density of the surrouding flow, then this value is set to x times of RHO, am I correct?
The units in the input file are correct. In that example, the structure is a boundary (one-dimensional structure), and so there is not a clear way to have it have the same mass density as the surrounding fluid.
If you use the IB method with a codimension-0 structure (2D structure region in a 2D computation, 3D structure region in a 3D computation), then the structure will automatically have the same mass density as the background fluid — there is no need to use the pIB method.
The way to think about it is that, in the regular IB method — not the pIB method — if the codimension of the structure is >= 1, then the structure is fully massless. If the codimension is 0, then the structure’s mass density is the same as the fluid’s mass density.
— Boyce
--
You received this message because you are subscribed to the Google Groups "IBAMR Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibamr-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ibamr-users/4106fb91-3f57-4e7a-aefe-dec713145df9n%40googlegroups.com.
On Apr 16, 2025, at 12:55 AM, 陈奕纯 <a1185...@gmail.com> wrote:Thanks for your kind reply.I want to use pIB for a cylinder as I mentioned above which has a larger mass density, does the "ForcingFunction" apply gravity to its vertex as well?I know pIB assigns a mass to each point, then the force applied to the point should be " elastic force plus penalty force plus gravity ". But the " function_1 = "-9.8*RHO" " in "ForcingFunction" seems to me only an addictive RHS term in N-S equation for background flow.I tried applying boundary density to my structure and "ForcingFunction" in input file, and it is falling slowly. I found it quite confusing. Is each mass point simply applied a "-9.8*RHO" in y-direction when solving its own Newton equation?
To view this discussion visit https://groups.google.com/d/msgid/ibamr-users/5d7d4d00-75cf-47b2-9625-6d54583bc53an%40googlegroups.com.
On Apr 16, 2025, at 8:16 AM, 陈奕纯 <a1185...@gmail.com> wrote:Thanks for the information.I found the function in IBStandardForceGen.cpp, which readsI tried to find how to use it in an example.cpp file, and found lines like thisIBStandardForceGen::setUniformBodyForce(IBTK::Vector F, int structure_id, int level_number){d_uniform_body_force_data[level_number][structure_id] = std::move(F);return;} // setUniformBodyForcePointer<IBStandardForceGen> ib_force_fcn = new IBStandardForceGen();ib_force_fcn->registerSpringForceFunction(0, &linear_spring_force, &linear_spring_force_deriv);ib_method_ops->registerIBLagrangianForceFunction(ib_force_fcn);and I checked the doc of the function that readsvoid setUniformBodyForce (IBTK::Vector F, int structure_id, int level_number)
Set a uniform body force that is applied on each point in the structure with the given structure_id.
So I guess if I want to add gravity to my structure, what I need to do is to add a few lines like this:Pointer<IBStandardForceGen> ib_force_fcn = new IBStandardForceGen();//ib_force_fcn->registerSpringForceFunction(0, &linear_spring_force, &linear_spring_force_deriv);IBTK::vector<float> F(0, -mass_structure*9.8);ib_force_fcn->setUniformBodyForce(F, 0, level_number);ib_method_ops->registerIBLagrangianForceFunction(ib_force_fcn);Is my code correct?I understand that structure_id starts from 0 but what does level_number means?
Let me sum up what needs to be done if I want to simulate a 2D cylinder with radius R and larger mass density which has N vertex in a 2D domain:1. In input file, add ForcingFunction attribute and specify function_1 = "-RHO*9.8" to apply gravity term on N-S equation for background flow2. In input file, add uniform_boundary_mass attribute to my structure (let's view it as a ring with mass M) and set it to M/N ,and the unit for M should be g not kg
3. In example.cpp file, add lines shown aboveAm I correct?
To view this discussion visit https://groups.google.com/d/msgid/ibamr-users/f8de73cd-c000-4983-a761-b647cf440ffen%40googlegroups.com.