Skip to content

Re: Open Top – Boundary Condition

#2455
ivan
Member

Thank you, Mathias,

As I am simulating something closer to a recipient, there would be no inlet, just an open air top with a pressure boundary condition. And yes, I have been basing myself in the cylinder example, but the main problem is I do not know which descriptors should be included along the addPressure function in order to make it work properly. Besides that, there are some other obstacles before it.

For example, that’s how I’ve set my Geometry

Code:
// Sets material number for fluid and boundary
superGeometry.rename(0,1);

std::vector<T> origin1(2,T());
origin1[0] = 0;
origin1[1] = 0;

std::vector<T> origin2(2,T());
origin2[0] = 0;
origin2[1] = ny-wallThickness;

std::vector<T> origin3(2,T());
origin3[0] = 0;
origin3[1] = wallThickness;

std::vector<T> origin4(2,T());
origin4[0] = nx-wallThickness-1;
origin4[1] = wallThickness;

std::vector<T> extend1(2,T());
extend1[0] = nx;
extend1[1] = wallThickness;

std::vector<T> extend2(2,T());
extend2[0] = wallThickness;
extend2[1] = ny-wallThickness;

Vector<T,2> centerDroplet(centerDropletX,centerDropletY);

IndicatorCuboid2D<T> bottom(extend1, origin1);
IndicatorCuboid2D<T> top(extend1, origin2);
IndicatorCuboid2D<T> leftwall(extend2, origin3);
IndicatorCuboid2D<T> rightwall(extend2, origin4);
IndicatorCircle2D<T> droplet(centerDroplet, radiusDroplet);

superGeometry.rename(1,2,droplet);
superGeometry.rename(1,3,bottom);
superGeometry.rename(1,3,leftwall);
superGeometry.rename(1,3,rightwall);
superGeometry.rename(1,4,top);

And that’s the dynamics of the material numbers:

Code:
/// define lattice Dynamics
sLatticeOne.defineDynamics(superGeometry, 0, &instances::getBounceBack<T, DESCRIPTOR>());
sLatticeOne.defineDynamics(superGeometry, 1, &bulkDynamics1);
sLatticeOne.defineDynamics(superGeometry, 2, &bulkDynamics1);
sLatticeOne.defineDynamics(superGeometry, 3, &instances::getBounceBack<T, DESCRIPTOR>());
sLatticeOne.defineDynamics(superGeometry, 4, &instances::getBounceBack<T, DESCRIPTOR>());

sLatticeTwo.defineDynamics(superGeometry, 0, &instances::getBounceBack<T, DESCRIPTOR>());
sLatticeTwo.defineDynamics(superGeometry, 1, &bulkDynamics2);
sLatticeTwo.defineDynamics(superGeometry, 2, &bulkDynamics2);
sLatticeTwo.defineDynamics(superGeometry, 3, &instances::getBounceBack<T, DESCRIPTOR>());
sLatticeTwo.defineDynamics(superGeometry, 4, &instances::getBounceBack<T, DESCRIPTOR>());

So basically number 1 is my static fluid, number 2 is the lighter immiscible fluid, number 3 are the walls and number 4 is the open air top, which for now is randomly set with bounce back as well. First thing I should do in order to include the pressure boundary condition is to set material number 4 as the static fluid as well. The problem is for some reason, if I switch the previous code to the following one

Code:
/// define lattice Dynamics
sLatticeOne.defineDynamics(superGeometry, 0, &instances::getBounceBack<T, DESCRIPTOR>());
sLatticeOne.defineDynamics(superGeometry, 1, &bulkDynamics1);
sLatticeOne.defineDynamics(superGeometry, 2, &bulkDynamics1);
sLatticeOne.defineDynamics(superGeometry, 3, &instances::getBounceBack<T, DESCRIPTOR>());
[b] sLatticeOne.defineDynamics(superGeometry, 4, &bulkDynamics1);[/b]

sLatticeTwo.defineDynamics(superGeometry, 0, &instances::getBounceBack<T, DESCRIPTOR>());
sLatticeTwo.defineDynamics(superGeometry, 1, &bulkDynamics2);
sLatticeTwo.defineDynamics(superGeometry, 2, &bulkDynamics2);
sLatticeTwo.defineDynamics(superGeometry, 3, &instances::getBounceBack<T, DESCRIPTOR>());
[b] sLatticeTwo.defineDynamics(superGeometry, 4, &bulkDynamics2);[/b]

The material number 4 is set as the lighter fluid as well. How can I set it as the static fluid without using the same material number?