89 double _val, u, v, dV, rho;
97 for (
int i = 1; i <= 3; i++ ) {
98 for (
int j = 1; j <= 3; j++ ) {
100 _val = n.
at(i) * n.
at(j) * rho * dV;
101 answer.
at(2 * i - 1, 2 * j - 1) += _val;
102 answer.
at(2 * i, 2 * j) += _val;
105 u = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
106 v = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
107 answer.
at(2 * i - 1, 2 * j - 1) += ( u *
b [ i - 1 ] + v *
c [ j - 1 ] ) * n.
at(j) * rho *
t_supg * dV;
108 answer.
at(2 * i, 2 * j) += ( u *
b [ i - 1 ] + v *
c [ j - 1 ] ) * n.
at(j) * rho *
t_supg * dV;
120 double dudx, dudy, dvdx, dvdy, _u, _v;
126 dudx =
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5);
127 dudy =
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5);
128 dvdx =
b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6);
129 dvdy =
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6);
136 _u = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
137 _v = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
140 for (
int i = 1; i <= 3; i++ ) {
141 answer.
at(2 * i - 1) += rho * n.
at(i) * ( _u * dudx + _v * dudy ) * dV;
142 answer.
at(2 * i) += rho * n.
at(i) * ( _u * dvdx + _v * dvdy ) * dV;
146 for (
int i = 1; i <= 3; i++ ) {
147 answer.
at(2 * i - 1) += ( _u *
b [ i - 1 ] + _v *
c [ i - 1 ] ) * ( _u * dudx + _v * dudy ) * rho *
t_supg * dV;
148 answer.
at(2 * i) += ( _u *
b [ i - 1 ] + _v *
c [ i - 1 ] ) * ( _u * dvdx + _v * dvdy ) * rho *
t_supg * dV;
162 double dudx [ 2 ] [ 2 ];
163 int w_dof_addr, u_dof_addr, d1j, d2j, dij;
164 double _u, _v, dV, rho;
166 dudx [ 0 ] [ 0 ] =
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5);
167 dudx [ 0 ] [ 1 ] =
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5);
168 dudx [ 1 ] [ 0 ] =
b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6);
169 dudx [ 1 ] [ 1 ] =
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6);
176 _u = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
177 _v = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
180 for (
int i = 1; i <= 2; i++ ) {
181 for (
int k = 1; k <= 3; k++ ) {
182 for (
int j = 1; j <= 2; j++ ) {
183 for (
int m = 1; m <= 3; m++ ) {
184 w_dof_addr = ( k - 1 ) * 2 + i;
185 u_dof_addr = ( m - 1 ) * 2 + j;
189 answer.
at(w_dof_addr, u_dof_addr) += dV * rho * n.
at(k) * ( 0.0 * d1j * n.
at(m) * dudx [ i - 1 ] [ 0 ] + dij * _u *
b [ m - 1 ] +
190 0.0 * d2j * n.
at(m) * dudx [ i - 1 ] [ 0 ] + dij * _v *
c [ m - 1 ] );
197 for (
int i = 1; i <= 2; i++ ) {
198 for (
int k = 1; k <= 3; k++ ) {
199 for (
int j = 1; j <= 2; j++ ) {
200 for (
int m = 1; m <= 3; m++ ) {
201 w_dof_addr = ( k - 1 ) * 2 + i;
202 u_dof_addr = ( m - 1 ) * 2 + j;
206 answer.
at(w_dof_addr, u_dof_addr) += dV *
t_supg * rho *
207 ( _u *
b [ k - 1 ] + _v *
c [ k - 1 ] ) * ( dij * _u *
b [ m - 1 ] + dij * _v *
c [ m - 1 ] );
244 _u = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
245 _v = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
247 for (
int i = 1; i <= 3; i++ ) {
248 answer.
at(2 * i - 1) -=
t_supg * ( _u *
b [ i - 1 ] + _v *
c [ i - 1 ] ) * ( stress.
at(1) / _r ) * dV / Re;
249 answer.
at(2 * i) -=
t_supg * ( _u *
b [ i - 1 ] + _v *
c [ i - 1 ] ) * ( stress.
at(4) / _r ) * dV / Re;
289 _u = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
290 _v = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
292 for (
int i = 1; i <= 3; i++ ) {
293 for (
int j = 1; j <= 6; j++ ) {
297 answer.
at(2 * i - 1, j) -=
t_supg * ( _u *
b [ i - 1 ] + _v *
c [ i - 1 ] ) * ( _db.
at(1, j) / _r ) * dV;
298 answer.
at(2 * i, j) -=
t_supg * ( _u *
b [ i - 1 ] + _v *
c [ i - 1 ] ) * ( _db.
at(4, j) / _r ) * dV;
307 answer.
times(1. / Re);
326 for (
int i = 1; i <= 3; i++ ) {
327 for (
int j = 1; j <= 3; j++ ) {
328 answer.
at(2 * i - 1, j) -=
b [ i - 1 ] * n.
at(j) * dV;
329 answer.
at(2 * i, j) -=
c [ i - 1 ] * n.
at(j) * dV;
331 answer.
at(2 * i - 1, j) -= n.
at(i) * n.
at(j) * dV / _r;
336 _u = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
337 _v = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
338 for (
int i = 1; i <= 3; i++ ) {
339 for (
int j = 1; j <= 3; j++ ) {
340 answer.
at(2 * i - 1, j) += ( _u *
b [ i - 1 ] + _v *
c [ i - 1 ] ) *
b [ j - 1 ] * dV *
t_supg;
341 answer.
at(2 * i, j) += ( _u *
b [ i - 1 ] + _v *
c [ i - 1 ] ) *
c [ j - 1 ] * dV *
t_supg;
353 b [ 0 ],
c [ 0 ],
b [ 1 ], c [ 1 ], b [ 2 ], c [ 2 ]
360 for (
int i = 1; i <= 6; i++ ) {
361 for (
int j = 1; j <= 6; j++ ) {
362 answer.
at(i, j) += dV *
t_lsic * rho * n [ i - 1 ] * n [ j - 1 ];
381 for (
int i = 1; i <= 3; i++ ) {
382 for (
int j = 1; j <= 3; j++ ) {
383 answer.
at(j, 2 * i - 1) +=
b [ i - 1 ] * n.
at(j) * dV;
384 answer.
at(j, 2 * i) +=
c [ i - 1 ] * n.
at(j) * dV;
386 answer.
at(i, 1 + ( j - 1 ) * 2) += n.
at(i) * n.
at(j) * dV / _r;
396 double dudx, dudy, dvdx, dvdy, _u, _v;
404 dudx =
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5);
405 dudy =
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5);
406 dvdx =
b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6);
407 dvdy =
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6);
413 _u = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
414 _v = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
416 for (
int i = 1; i <= 3; i++ ) {
417 answer.
at(i) +=
t_pspg * dV * (
b [ i - 1 ] * ( _u * dudx + _v * dudy ) +
c [ i - 1 ] * ( _u * dvdx + _v * dvdy ) );
428 int w_dof_addr, u_dof_addr, d1j, d2j, km1, mm1;
439 _u = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
440 _v = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
442 for (
int k = 1; k <= 3; k++ ) {
444 for (
int j = 1; j <= 2; j++ ) {
445 for (
int m = 1; m <= 3; m++ ) {
447 u_dof_addr = ( m - 1 ) * 2 + j;
451 answer.
at(w_dof_addr, u_dof_addr) +=
t_pspg * dV * (
b [ km1 ] * ( _u * d1j *
b [ mm1 ] + _v * d1j *
c [ mm1 ] ) +
c [ km1 ] * ( _u * d2j *
b [ mm1 ] + _v * d2j *
c [ mm1 ] ) );
479 stress.
times(1. / Re);
480 for (
int i = 1; i <= 3; i++ ) {
481 answer.
at(i) -=
t_pspg * (
b [ i - 1 ] * stress.
at(1) +
c [ i - 1 ] * stress.
at(4) ) * dV / rho / _r;
503 double rho = mat->
give(
'd', gp);
511 for (
int i = 1; i <= 3; i++ ) {
512 for (
int j = 1; j <= 6; j++ ) {
513 answer.
at(i, j) -=
t_pspg * (
b [ i - 1 ] * ( _db.
at(1, j) / _r ) +
c [ i - 1 ] * ( _db.
at(4, j) / _r ) ) * dV / rho;
518 answer.
times(1. / Re);
535 for (
int i = 1; i <= 3; i++ ) {
536 for (
int j = 1; j <= 3; j++ ) {
537 answer.
at(i, 2 * j - 1) +=
t_pspg * dV *
b [ i - 1 ] * n.
at(j);
538 answer.
at(i, 2 * j) +=
t_pspg * dV *
c [ i - 1 ] * n.
at(j);
554 double coeff =
t_pspg / rho;
556 for (
int i = 1; i <= 3; i++ ) {
557 for (
int j = 1; j <= 3; j++ ) {
558 answer.
at(i, j) += dV * coeff * (
b [ i - 1 ] *
b [ j - 1 ] +
c [ i - 1 ] *
c [ j - 1 ] );
601 for (
int i = 1; i <= nLoads; i++ ) {
610 double coeff = rho * dV;
612 double u = nV.
at(1) * un.
at(1) + nV.
at(2) * un.
at(3) + nV.
at(3) * un.
at(5);
613 double v = nV.
at(1) * un.
at(2) + nV.
at(2) * un.
at(4) + nV.
at(3) * un.
at(6);
615 answer.
at(1) += coeff * ( gVector.
at(1) * ( nV.
at(1) +
t_supg * (
b [ 0 ] * u +
c [ 0 ] * v ) ) );
616 answer.
at(2) += coeff * ( gVector.
at(2) * ( nV.
at(1) +
t_supg * (
b [ 0 ] * u +
c [ 0 ] * v ) ) );
617 answer.
at(3) += coeff * ( gVector.
at(1) * ( nV.
at(2) +
t_supg * (
b [ 1 ] * u +
c [ 1 ] * v ) ) );
618 answer.
at(4) += coeff * ( gVector.
at(2) * ( nV.
at(2) +
t_supg * (
b [ 1 ] * u +
c [ 1 ] * v ) ) );
619 answer.
at(5) += coeff * ( gVector.
at(1) * ( nV.
at(3) +
t_supg * (
b [ 2 ] * u +
c [ 2 ] * v ) ) );
620 answer.
at(6) += coeff * ( gVector.
at(2) * ( nV.
at(3) +
t_supg * (
b [ 2 ] * u +
c [ 2 ] * v ) ) );
629 int n1, n2, code, sid;
630 double tx, ty, l, side_r;
640 n2 = ( n1 == 3 ? 1 : n1 + 1 );
644 l = sqrt(tx * tx + ty * ty);
653 for (
int i = 1; i <= numLoads; i++ ) {
666 answer.
at(n1 * 2 - 1) += t.
at(1) * side_r * l / 2.;
667 answer.
at(n1 * 2) += t.
at(2) * side_r * l / 2.;
669 answer.
at(n2 * 2 - 1) += t.
at(1) * side_r * l / 2.;
670 answer.
at(n2 * 2) += t.
at(2) * side_r * l / 2.;
690 for (
int i = 1; i <= nLoads; i++ ) {
698 double coeff =
t_pspg * dV;
700 answer.
at(1) += coeff * (
b [ 0 ] * gVector.
at(1) +
c [ 0 ] * gVector.
at(2) );
701 answer.
at(2) += coeff * (
b [ 1 ] * gVector.
at(1) +
c [ 1 ] * gVector.
at(2) );
702 answer.
at(3) += coeff * (
b [ 2 ] * gVector.
at(1) +
c [ 2 ] * gVector.
at(2) );
713 if ( type != ExternalForcesVector ) {
733 double u = nV.
at(1) * un.
at(1) + nV.
at(2) * un.
at(3) + nV.
at(3) * un.
at(5);
734 double v = nV.
at(1) * un.
at(2) + nV.
at(2) * un.
at(4) + nV.
at(3) * un.
at(6);
737 answer.
at(1) += coeff * gVector.
at(1) * ( nV.
at(1) +
t_supg * (
b [ 0 ] * u +
c [ 0 ] * v ) );
738 answer.
at(2) += coeff * gVector.
at(2) * ( nV.
at(1) +
t_supg * (
b [ 0 ] * u +
c [ 0 ] * v ) );
739 answer.
at(4) += coeff * gVector.
at(1) * ( nV.
at(2) +
t_supg * (
b [ 1 ] * u +
c [ 1 ] * v ) );
740 answer.
at(5) += coeff * gVector.
at(2) * ( nV.
at(2) +
t_supg * (
b [ 1 ] * u +
c [ 1 ] * v ) );
741 answer.
at(7) += coeff * gVector.
at(1) * ( nV.
at(3) +
t_supg * (
b [ 2 ] * u +
c [ 2 ] * v ) );
742 answer.
at(8) += coeff * gVector.
at(2) * ( nV.
at(3) +
t_supg * (
b [ 2 ] * u +
c [ 2 ] * v ) );
745 answer.
at(3) += coeff * (
b [ 0 ] * gVector.
at(1) +
c [ 0 ] * gVector.
at(2) );
746 answer.
at(6) += coeff * (
b [ 1 ] * gVector.
at(1) +
c [ 1 ] * gVector.
at(2) );
747 answer.
at(9) += coeff * (
b [ 2 ] * gVector.
at(1) +
c [ 2 ] * gVector.
at(2) );
763 for (
int i = 1; i <= nLoads; i++ ) {
777 answer.
add(helpMatrix);
786 double l, t1, t2, _t1, _t2;
794 node2 = ( node1 == 3 ? 1 : node1 + 1 );
798 l = sqrt(_t1 * _t1 + _t2 * _t2);
807 nt.at(1) = n.
at(1) * t1;
808 nt.at(2) = n.
at(1) * t2;
809 nt.at(3) = n.
at(2) * t1;
810 nt.at(4) = n.
at(2) * t2;
811 nt.at(5) = n.
at(3) * t1;
812 nt.at(6) = n.
at(3) * t2;
823 double l, n1, n2, _t1, _t2;
831 node2 = ( node1 == 3 ? 1 : node1 + 1 );
836 l = sqrt(_t1 * _t1 + _t2 * _t2);
846 nt.at(1) = n.
at(1) * n1;
847 nt.at(2) = n.
at(1) * n2;
848 nt.at(3) = n.
at(2) * n1;
849 nt.at(4) = n.
at(2) * n2;
850 nt.at(5) = n.
at(3) * n1;
851 nt.at(6) = n.
at(3) * n2;
862 double l, n1, n2, t1, t2, dV;
868 node2 = ( node1 == 3 ? 1 : node1 + 1 );
872 l = sqrt(t1 * t1 + t2 * t2);
882 nt.at(1) = n.
at(1) * n1;
883 nt.at(2) = n.
at(1) * n2;
884 nt.at(3) = n.
at(2) * n1;
885 nt.at(4) = n.
at(2) * n2;
886 nt.at(5) = n.
at(3) * n1;
887 nt.at(6) = n.
at(3) * n2;
908 for (
int i = 1; i <= nLoads; i++ ) {
920 answer.
add(helpMatrix);
942 _b.
at(1, 1) =
b [ 0 ];
944 _b.
at(1, 3) =
b [ 1 ];
946 _b.
at(1, 5) =
b [ 2 ];
948 _b.
at(2, 1) = 1. / _r;
950 _b.
at(2, 3) = 1. / _r;
952 _b.
at(2, 5) = 1. / _r;
955 _b.
at(3, 2) =
c [ 0 ];
957 _b.
at(3, 4) =
c [ 1 ];
959 _b.
at(3, 6) =
c [ 2 ];
960 _b.
at(4, 1) =
c [ 0 ];
961 _b.
at(4, 2) =
b [ 0 ];
962 _b.
at(4, 3) =
c [ 1 ];
963 _b.
at(4, 4) =
b [ 1 ];
964 _b.
at(4, 5) =
c [ 2 ];
965 _b.
at(4, 6) =
b [ 2 ];
977 double _r, weight, detJ;
983 return detJ * weight * _r;
1003 double h_ugn, sum = 0.0, vnorm, t_sugn1, t_sugn2, t_sugn3, u_1, u_2;
1004 double dscale, uscale, lscale, tscale, dt;
1031 for (
int i = 1; i <= 3; i++ ) {
1033 sum += fabs(u.
at( ( im1 ) * 2 + 1 ) *
b [ im1 ] / lscale + u.
at(im1 * 2 + 2) *
c [ im1 ] / lscale);
1042 for (
int i = 1; i <= 3; i++ ) {
1044 u_1 = u.
at( ( im1 ) * 2 + 1 );
1045 u_2 = u.
at( ( im1 ) * 2 + 2 );
1046 vnorm =
max( vnorm, sqrt(u_1 * u_1 + u_2 * u_2) );
1049 if ( ( vnorm == 0.0 ) || ( sum < vnorm * 1e-10 ) ) {
1053 this->
t_supg = 1. / sqrt( 1. / ( t_sugn2 * t_sugn2 ) );
1057 h_ugn = 2.0 * vnorm / sum;
1060 t_sugn3 = h_ugn * h_ugn / 4.0 / nu;
1062 this->
t_supg = 1. / sqrt( 1. / ( t_sugn1 * t_sugn1 ) + 1. / ( t_sugn2 * t_sugn2 ) + 1. / ( t_sugn3 * t_sugn3 ) );
1069 this->
t_supg *= uscale / lscale;
1070 this->
t_pspg *= 1. / ( lscale * dscale );
1071 this->
t_lsic *= ( dscale * uscale ) / ( lscale * lscale );
1079 int neg = 0, pos = 0, zero = 0, si = 0;
1080 double x1, x2, x3, y1, y2, y3;
1083 for (
double ifi: fi ) {
1086 }
else if ( ifi < 0.0 ) {
1096 }
else if ( pos == 0 ) {
1099 }
else if ( zero == 3 ) {
1106 for (
int i = 1; i <= 3; i++ ) {
1107 if ( ( pos > neg ) && ( fi.at(i) < 0.0 ) ) {
1112 if ( ( pos < neg ) && ( fi.at(i) >= 0.0 ) ) {
1118 if ( si && ( ( pos + neg ) == 3 ) ) {
1123 int prev_node = ( si > 1 ) ? si - 1 : 3;
1124 int next_node = ( si < 3 ) ? si + 1 : 1;
1126 double t = fi.at(si) / ( fi.at(si) - fi.at(next_node) );
1130 t = fi.at(si) / ( fi.at(si) - fi.at(prev_node) );
1136 double __volume = 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 ) * ( ( x1 + x2 + x3 ) / 3. );
1138 if ( fabs(__volume) / volume > 1.00001 ) {
1143 if ( fabs(__volume) > volume ) {
1144 __volume =
sgn(__volume) * volume;
1149 answer.
at(2) = fabs(__volume) / volume;
1150 answer.
at(1) = 1.0 - answer.
at(2);
1153 answer.
at(1) = fabs(__volume) / volume;
1154 answer.
at(2) = 1.0 - answer.
at(1);
CrossSection * giveCrossSection()
virtual ~TR1_2D_SUPG_AXI()
virtual void computePressureTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes pressure terms for momentum balance equations(s).
IntArray * giveBoundaryLoadArray()
Returns array containing load numbers of boundary loads acting on element.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
virtual void computeDiffusionDerivativeTerm_MB(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep)
Computes the derivative of diffusion terms for momentum balance equations(s) with respect to nodal ve...
virtual void computeAccelerationTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes acceleration terms for mass conservation equation.
#define FMElement_PrescribedTractionBC
virtual void computeAdvectionTerm_MB(FloatArray &answer, TimeStep *tStep)
Computes nonlinear advection terms for momentum balance equations(s).
Abstract base class for all fluid materials.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
virtual void computeDiffusionTerm_MC(FloatArray &answer, TimeStep *tStep)
Computes diffusion terms for mass conservation equation.
const FloatArray & giveSubPatchCoordinates()
Returns local sub-patch coordinates of the receiver.
bcGeomType
Type representing the geometric character of loading.
double & at(int i)
Coefficient access function.
int max(int i, int j)
Returns bigger value form two given decimals.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
double sgn(double i)
Returns the signum of given value (if value is < 0 returns -1, otherwise returns 1) ...
Class implementing element body load, acting over whole element volume (e.g., the dead weight)...
void clear()
Clears receiver (zero size).
Base class for fluid problems.
IntArray boundarySides
Array of boundary sides.
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
void negated()
Changes sign of receiver values.
virtual double giveProperty(int aProperty, TimeStep *tStep, const std::map< std::string, FunctionArgument > &valDict)
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Computes boundary condition value - its components values at given time.
void plusDyadUnsym(const FloatArray &a, const FloatArray &b, double dV)
Adds to the receiver the product .
virtual void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
virtual double giveCoordinate(int i)
virtual void updateStabilizationCoeffs(TimeStep *tStep)
Updates the stabilization coefficients used for CBS and SUPG algorithms.
virtual void computeAdvectionTerm_MC(FloatArray &answer, TimeStep *tStep)
Computes advection terms for mass conservation equation.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void LS_PCS_computeVOFFractions(FloatArray &answer, FloatArray &fi)
Returns VOF fractions for each material on element according to nodal values of level set function (p...
virtual double computeRadiusAt(GaussPoint *gp)
virtual bcType giveType() const
double giveTimeIncrement()
Returns solution step associated time increment.
virtual void computeBCLhsTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes Lhs terms due to boundary conditions - velocity.
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
bcType
Type representing the type of bc.
virtual void computeSlipWithFrictionBCTerm_MB(FloatMatrix &answer, Load *load, int side, TimeStep *tStep)
Computes Lhs term due to applied slip with friction bc.
virtual void computeAdvectionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes the derivative of advection terms for mass conservation equation with respect to nodal veloc...
virtual void computeDeviatoricStressVector(FloatArray &stress_dev, double &epsp_vol, GaussPoint *gp, const FloatArray &eps, double pressure, TimeStep *tStep)
Computes the deviatoric stress vector and volumetric strain rate from given deviatoric strain and pre...
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
virtual void computeVectorOfVelocities(ValueModeType mode, TimeStep *tStep, FloatArray &velocities)
virtual void computeOutFlowBCTerm_MB(FloatMatrix &answer, int side, TimeStep *tStep)
Computes Lhs contribution due to outflow BC.
virtual double giveVariableScale(VarScaleType varId)
Returns the scale factor for given variable type.
virtual void initGeometry()
TR1_2D_SUPG_AXI(int n, Domain *d)
virtual double giveWeight()
Returns integration weight of receiver.
void times(double f)
Multiplies receiver by factor f.
double t_supg
Stabilization coefficients, updated for each solution step in updateStabilizationCoeffs() ...
Wrapper around element definition to provide FEICellGeometry interface.
IntArray * giveBodyLoadArray()
Returns array containing load numbers of loads acting on element.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
virtual void computeBMtrx(FloatMatrix &answer, GaussPoint *gp)
IntArray bodyLoadArray
Array containing indexes of loads (body loads and boundary loads are kept separately), that apply on receiver.
virtual void computeBCLhsPressureTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes Lhs terms due to boundary conditions - pressure.
virtual void computeAccelerationTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes acceleration terms (generalized mass matrix with stabilization terms) for momentum balance e...
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
double at(int i, int j) const
Coefficient access function.
virtual void computeDiffusionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes diffusion derivative terms for mass conservation equation.
virtual void computeLoadVector(FloatArray &answer, BodyLoad *load, CharType type, ValueModeType mode, TimeStep *tStep)
Computes the contribution of the given body load (volumetric).
virtual void computeLSICStabilizationTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes SLIC stabilization term for momentum balance equation(s).
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
Class representing vector of real numbers.
void plusDyadSymmUpper(const FloatArray &a, double dV)
Adds to the receiver the dyadic product .
virtual void computeBCRhsTerm_MB(FloatArray &answer, TimeStep *tStep)
Computes Rhs terms due to boundary conditions.
Implementation of matrix containing floating point numbers.
virtual void computePressureTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes pressure terms for mass conservation equation.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
virtual void computeDeviatoricStrain(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
virtual void computeAdvectionDerivativeTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes the derivative of advection terms for momentum balance equations(s) with respect to nodal ve...
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void computeNVector(FloatArray &answer, GaussPoint *gp)
virtual void computeLinearAdvectionTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes the linear advection term for mass conservation equation.
void add(const FloatMatrix &a)
Adds matrix to the receiver.
virtual void computeDiffusionTerm_MB(FloatArray &answer, TimeStep *tStep)
Computes diffusion terms for momentum balance equations(s).
double rc
Radius at element center.
void zero()
Zeroes all coefficients of receiver.
virtual bcGeomType giveBCGeoType() const
Returns geometry character of boundary condition.
IntArray boundaryCodes
Boundary sides codes.
void times(double s)
Multiplies receiver with scalar.
virtual void computeBCRhsTerm_MC(FloatArray &answer, TimeStep *tStep)
Computes Rhs terms due to boundary conditions.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
void zero()
Zeroes all coefficient of receiver.
Class representing 2d linear triangular element for solving incompressible fluid with SUPG solver...
Load is base abstract class for all loads.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void initGeometry()
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
virtual bcValType giveBCValType() const
Returns receiver load type.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)
Computes components values of load at given point - global coordinates (coordinates given)...
Load * giveLoad(int n)
Service for accessing particular domain load.
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
Class representing integration point in finite element program.
IntArray boundaryLoadArray
Class representing solution step.
virtual void computePenetrationWithResistanceBCTerm_MB(FloatMatrix &answer, Load *load, int side, TimeStep *tStep)
Computes Lhs contribution due to applied Penetration bc.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
Adds the product .
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
virtual void giveDeviatoricStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)=0
Computes the deviatoric stiffness; .