balzar29
Forum Replies Created
-
AuthorPosts
-
balzar29Member
PS: how can i prevent the backflow when the perturbation arrives to the outlet?
Sorry for my insistence.
balzar29Member*i’ve set walls on top and bottom with Poiseuille inlet not periodic boundery
balzar29MemberHi robin,
i’m back on this post.
I found out some instability problems. I’vs set Smagorinsky model to investigate high Reynolds number, then the boundery condition are set as inlet velocity (left one), pressure outlet (right one) and periodic (top and bottom). If i delate the Poiseuille inlet profile, the problem crash at the top and bottom left corner where periodic boundery meets the inlet. Leaving the Poiseuille gives more stability, but after a certain time the instability strikes out and i really don’t know how to solve this.
I’ve set latticeL=x and Delta_T=x^2 to avoid the compressibility problem. What i don’t understand is why latticeU is defined in the guide like delta_t/delta_x (page 26). I know that delta parameters are adimensional, but velocity is space frac time not time frac space. Anyway like delta_x=latticeL/charL, maby also delta_u=latticeU/charU then if charU=1 the result become delta_u=latticeU, but the problem is still that delta_u=delta_t/delta_x (time/space) and not delta_x/delta_t (space/time).Just using the guide, if i want delta_t=delta_x^2 it should be latticeU=latticeL because latticeL=delta_x=x, latticeU=delta_u=delta_t/delta_x, but delta_t=delta_x^2=x^2 so delta_u=x^2/x –> delta_u=x that is latticeU=x.
Am I doing something wrong?
Thanks for help!
balzar29MemberHi,
I’ve set the periodicity boundery layer on top and bottom, than the Poiseuille velocity profile in inlet is removed, but i still have stability problems at high reynolds number (2e6) and also at small reynolds number with a symmetric profile with no angle of attack (it should have only little drag and no lift) at a certain time the profile creates lift and on the top of it separation appears as if there is an angle of attack.You know why the program runs this way? Thank you.
balzar29MemberLast questions.
I’ve removed the Poiseuille inflow profile. I need to set periodic boundery condition on top and bottom and a constant inlet velocity and a gauge pressure in outlet. How can i have control on these parameters?
Now with the defined boundery condition when i increase Reynolds number over 200 the solution problem diverge…i can’t find where to change velocity, density and pressure.balzar29MemberPS: this is for non symmetrical airfoil, for the symmetrical ones it’s easiest but the boundery condition problem remains.
balzar29MemberHi robin,
thanks to your help now i can change shape in 2d cylinder example. This is the result for thin wing with no aerodynamic trailing or leading edge, just the shape!
Now my problems are in the boundery conditions. When i start the computation it gives me these errors after defining start parameters:
Code:[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (0,29) ~ (1.04833,0.751667), in direction 8
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (1,29) ~ (1.05,0.751667), in direction 1
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (1,33) ~ (1.05,0.758333), in direction 3
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (0,33) ~ (1.04833,0.758333), in direction 4
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (0,29) ~ (1.04833,0.751667), in direction 7
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (1,29) ~ (1.05,0.751667), in direction 8
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (2,29) ~ (1.05167,0.751667), in direction 1
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (0,33) ~ (1.04833,0.758333), in direction 5
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (2,33) ~ (1.05167,0.758333), in direction 3
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (1,33) ~ (1.05,0.758333), in direction 4
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (1,29) ~ (1.05,0.751667), in direction 7
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (2,29) ~ (1.05167,0.751667), in direction 8
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (3,29) ~ (1.05333,0.751667), in direction 1
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (1,33) ~ (1.05,0.758333), in direction 5
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (3,33) ~ (1.05333,0.758333), in direction 3
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (2,33) ~ (1.05167,0.758333), in direction 4
[BlockGeometryStatistics2D:6] updated
[sOffLatticeBoundaryCondition2D:6] Cuboid globiC 6 finished reading distances for ZeroVelocity Boundary.
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (2,29) ~ (1.05167,0.751667), in direction 7
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (3,29) ~ (1.05333,0.751667), in direction 8
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (4,29) ~ (1.055,0.751667), in direction 1
[BoundaryConditionInstantiator2D:3] ERROR: no boundary found at (2,33) ~ (1.05167,0.758333), in direction 5
[BlockGeometryStatistics2D:2] updated
[BoundaryConditionInstantiator2D:2] ERROR: no boundary found at (240,427) ~ (1.44833,0.708333), in direction 6
[BoundaryConditionInstantiator2D:2] ERROR: no boundary found at (240,426) ~ (1.44833,0.706667), in direction 7
[BoundaryConditionInstantiator2D:2] ERROR: no boundary found at (241,426) ~ (1.45,0.706667), in direction 8
[BoundaryConditionInstantiator2D:2] ERROR: no boundary found at (242,426) ~ (1.45167,0.706667), in direction 1
[BoundaryConditionInstantiator2D:2] ERROR: no boundary found at (241,426) ~ (1.45,0.706667), in direction 7
[BoundaryConditionInstantiator2D:2] ERROR: no boundary found at (242,426) ~ (1.45167,0.706667), in direction 8
[BoundaryConditionInstantiator2D:2] ERROR: no boundary found at (243,426) ~ (1.45333,0.706667), in direction 1
[BoundaryConditionInstantiator2D:2] ERROR: no boundary found at (242,426) ~ (1.45167,0.706667), in direction 7and so on, then the computation starts and gives results.
Have you some ideas? Thank!
balzar29MemberI’m sorry, but my c++ is very poor. I don’t understand where to change the function. I think that i’ve found the place where insert the airfoil equation, but if someone can halp me it would be better and faster. I need just some c++ explanation of this code in the file “indicatorF2D.hh”
Code:template <typename S>
IndicatorCircle2D<S>::IndicatorCircle2D(Vector<S,2> center, S radius)
: _center(center),
_radius2(radius*radius)
{
this->_myMin = _center – radius;
this->_myMax = _center + radius;
}// returns true if x is inside the circle
template <typename S>
bool IndicatorCircle2D<S>::operator()(bool output[], const S input[])
{
output[0] = ( std::pow(_center[0] – input[0],2) + std::pow(_center[1] – input[1], 2) <= _radius2 );
return output[0];
}template <typename S>
bool IndicatorCircle2D<S>::distance(S& distance, const Vector<S,2>& origin, const Vector<S,2>& direction, int iC)
{
S a = direction[0]*direction[0] + direction[1]*direction[1];// returns 0 if point is at the boundary of the sphere
if ( a == _radius2 ) {
distance = S(0);
return true;
}
// norm of direction
a = sqrt(a);S b = 2.*((origin[0] – _center[0])*direction[0] +
(origin[1] – _center[1])*direction[1])/a;
S c = -_radius2 + (origin[0] – _center[0])*(origin[0] – _center[0])
+ (origin[1] – _center[1])*(origin[1] – _center[1]);// discriminant
S d = b*b – 4.*c;
if (d < 0) {
return false;
}S x1 = (- b + sqrt(d)) *0.5;
S x2 = (- b – sqrt(d)) *0.5;// case if origin is inside the sphere
if ((x1<0.) || (x2<0.)) {
if (x1>0.) {
distance = x1;
return true;
}
if (x2>0.) {
distance = x2;
return true;
}
}
// case if origin is ouside the sphere
else {
distance = std::min(x1,x2);
return true;
}return false;
}template <typename S>
bool IndicatorCircle2D<S>::normal(Vector<S,2>& normal, const Vector<S,2>& origin, const Vector<S,2>& direction, int iC)
{
S dist;
if (!(distance(dist, origin, direction, iC)) ) {
return false;
}Vector<S,2> intresection(origin + dist*direction);
normal = intresection – _center;
return true;
}Thanks!!
balzar29Memberi’ll try! If i’ll be able to make it work i’ll post something!
Thanks for the help! -
AuthorPosts