|
My Project
programmer's documentation
|
Go to the documentation of this file. 1 #ifndef __CS_CONVECTION_DIFFUSION_H__
2 #define __CS_CONVECTION_DIFFUSION_H__
61 #define CS_ISOTROPIC_DIFFUSION (1 << 0)
64 #define CS_ORTHOTROPIC_DIFFUSION (1 << 1)
67 #define CS_ANISOTROPIC_LEFT_DIFFUSION (1 << 2)
70 #define CS_ANISOTROPIC_RIGHT_DIFFUSION (1 << 3)
73 #define CS_ANISOTROPIC_DIFFUSION ((1 << 2) + (1 << 3))
138 rfc = (nvf_r_f-nvf_r_c)/(1.-nvf_r_c);
140 if (nvf_p_c < beta_m) {
141 nvf_p_f = nvf_p_c*(1.+rfc*(1.-nvf_p_c)/beta_m);
143 r1f = (1.-nvf_r_f)/(1.-nvf_r_c);
145 nvf_p_f = r1f*nvf_p_c+rfc;
151 if (nvf_p_c < (nvf_r_c/3.)) {
152 r1 = nvf_r_f*(1.-3.*nvf_r_c+2.*nvf_r_f);
153 r2 = nvf_r_c*(1.-nvf_r_c);
155 nvf_p_f = nvf_p_c*r1/r2;
156 }
else if (nvf_p_c <= (nvf_r_c*(1.+nvf_r_f-nvf_r_c)/nvf_r_f)) {
157 rfc = (nvf_r_f-nvf_r_c)/(1.-nvf_r_c);
158 r1f = (1.-nvf_r_f)/(1.-nvf_r_c);
160 nvf_p_f = nvf_r_f*(r1f*nvf_p_c/nvf_r_c + rfc);
168 if (nvf_p_c < (3.*nvf_r_c/4.)) {
169 rfc = (nvf_r_f-nvf_r_c)/(1.-nvf_r_c);
171 nvf_p_f = nvf_r_f*(1.+rfc/3.)*nvf_p_c/nvf_r_c;
172 }
else if (nvf_p_c <= (nvf_r_c*(1.+2.*(nvf_r_f-nvf_r_c))/(2.*nvf_r_f-nvf_r_c))) {
173 rfc = (nvf_r_f-nvf_r_c)/(1.-nvf_r_c);
174 r1f = (1.-nvf_r_f)/(1.-nvf_r_c);
176 nvf_p_f = nvf_r_f*(r1f*nvf_p_c/nvf_r_c+rfc);
178 r1f = (1.-nvf_r_f)/(1.-nvf_r_c);
180 nvf_p_f = 1.-.5*r1f*(1.-nvf_p_c);
186 if (nvf_p_c < (nvf_r_c/(2.-nvf_r_c))) {
187 nvf_p_f = (2.*nvf_r_f-nvf_r_c)*nvf_p_c/nvf_r_c;
188 }
else if (nvf_p_c < nvf_r_c) {
189 rfc = (nvf_r_f-nvf_r_c)/(1.-nvf_r_c);
190 r1f = (1.-nvf_r_f)/(1.-nvf_r_c);
192 nvf_p_f = r1f*nvf_p_c+rfc;
193 }
else if (nvf_p_c < (nvf_r_c/nvf_r_f)) {
194 nvf_p_f = nvf_r_f*nvf_p_c/nvf_r_c;
202 if (nvf_p_c < (.5*nvf_r_c)) {
203 nvf_p_f = (2.*nvf_r_f-nvf_r_c)*nvf_p_c/nvf_r_c;
204 }
else if (nvf_p_c < (1.+nvf_r_c-nvf_r_f)) {
205 nvf_p_f = nvf_p_c+nvf_r_f-nvf_r_c;
213 if (nvf_p_c < nvf_r_c) {
214 nvf_p_f = nvf_r_f*nvf_p_c/nvf_r_c;
216 rfc = (nvf_r_f-nvf_r_c)/(1.-nvf_r_c);
217 r1f = (1.-nvf_r_f)/(1.-nvf_r_c);
219 nvf_p_f = r1f*nvf_p_c+rfc;
225 r1 = nvf_r_c*nvf_r_c-nvf_r_f;
226 r2 = nvf_r_c*(nvf_r_c-1.);
227 r3 = nvf_r_f-nvf_r_c;
229 nvf_p_f = nvf_p_c*(r1+r3*nvf_p_c)/r2;
234 b1 = (nvf_r_c-nvf_r_f)*nvf_r_c;
235 b2 = nvf_r_c+nvf_r_f+2.*nvf_r_f*nvf_r_f-4.*nvf_r_f*nvf_r_c;
237 if (nvf_p_c < (
b1/
b2)) {
238 r1 = -nvf_r_f*(1.-3.*nvf_r_c+2.*nvf_r_f);
239 r2 = nvf_r_c*(nvf_r_c-1.);
241 nvf_p_f = nvf_p_c*r1/r2;
242 }
else if (nvf_p_c < nvf_r_c) {
243 rfc = (nvf_r_f-nvf_r_c)/(1.-nvf_r_c);
244 r1f = (1.-nvf_r_f)/(1.-nvf_r_c);
246 nvf_p_f = r1f*nvf_p_c+rfc;
247 }
else if (nvf_p_c < (nvf_r_c*(1.+nvf_r_f-nvf_r_c)/nvf_r_f)) {
248 rfc = (nvf_r_f-nvf_r_c)/(1.-nvf_r_c);
249 r1f = (1.-nvf_r_f)/(1.-nvf_r_c);
251 nvf_p_f = nvf_r_f*(nvf_p_c*r1f/nvf_r_c+rfc);
259 if (nvf_p_c < (nvf_r_c/nvf_r_f)) {
260 nvf_p_f = nvf_r_f*nvf_p_c/nvf_r_c;
268 r1 = nvf_r_c*nvf_r_f*(nvf_r_f-nvf_r_c);
269 r2 = 2.*nvf_r_c*(1.-nvf_r_c)-nvf_r_f*(1.-nvf_r_f);
271 if (nvf_p_c < (r1/r2)) {
272 nvf_p_f = 2.*nvf_p_c;
273 }
else if (nvf_p_c <= (nvf_r_c*(1.+nvf_r_f-nvf_r_c)/nvf_r_f)) {
274 rfc = (nvf_r_f-nvf_r_c)/(1.-nvf_r_c);
275 r1f = (1.-nvf_r_f)/(1.-nvf_r_c);
277 nvf_p_f = nvf_r_f*(nvf_p_c*r1f/nvf_r_c+rfc);
322 cs_real_t blend, high_order, low_order, ratio;
333 high_order = 2.*nvf_p_c;
349 blend =
CS_MIN(1., pow(ratio, .5));
353 nvf_p_f = blend*high_order + (1.-blend)*low_order;
356 if (c_courant < .7 && c_courant > .3) {
357 nvf_p_f = nvf_p_f + (nvf_p_f - low_order)*(.7 - c_courant )/.4;
358 }
else if (c_courant >= .7) {
363 if (c_courant <= .3) {
365 }
else if (c_courant <= .6) {
366 high_order =
CS_MIN(1., nvf_p_c/.3);
367 }
else if (c_courant <= .7) {
372 high_order = 10.*( (.7-c_courant)*
CS_MIN(1., nvf_p_c/.3)
373 + (c_courant-.6)*superbee);
393 blend =
CS_MIN(1., pow(ratio, 2.));
397 nvf_p_f = blend*high_order + (1.-blend)*low_order;
416 blend =
CS_MIN(1., pow(ratio, 4.));
420 nvf_p_f = blend*high_order + (1.-blend)*low_order;
464 testi = grdpai[0]*i_face_normal[0]
465 + grdpai[1]*i_face_normal[1]
466 + grdpai[2]*i_face_normal[2];
467 testj = grdpaj[0]*i_face_normal[0]
468 + grdpaj[1]*i_face_normal[1]
469 + grdpaj[2]*i_face_normal[2];
471 *testij = grdpai[0]*grdpaj[0]
472 + grdpai[1]*grdpaj[1]
473 + grdpai[2]*grdpaj[2];
476 dcc = gradi[0]*i_face_normal[0]
477 + gradi[1]*i_face_normal[1]
478 + gradi[2]*i_face_normal[2];
480 ddj = (pj-
pi)/distf *srfan;
482 dcc = gradj[0]*i_face_normal[0]
483 + gradj[1]*i_face_normal[1]
484 + gradj[2]*i_face_normal[2];
485 ddi = (pj-
pi)/distf *srfan;
532 for (
int i = 0; i < 3; i++) {
533 *testij += gradsti[i][0]*gradstj[i][0]
534 + gradsti[i][1]*gradstj[i][1]
535 + gradsti[i][2]*gradstj[i][2];
537 testi[i] = gradsti[i][0]*i_face_normal[0]
538 + gradsti[i][1]*i_face_normal[1]
539 + gradsti[i][2]*i_face_normal[2];
540 testj[i] = gradstj[i][0]*i_face_normal[0]
541 + gradstj[i][1]*i_face_normal[1]
542 + gradstj[i][2]*i_face_normal[2];
545 dcc[i] = gradi[i][0]*i_face_normal[0]
546 + gradi[i][1]*i_face_normal[1]
547 + gradi[i][2]*i_face_normal[2];
549 ddj[i] = (pj[i]-
pi[i])/distf *srfan;
551 dcc[i] = gradj[i][0]*i_face_normal[0]
552 + gradj[i][1]*i_face_normal[1]
553 + gradj[i][2]*i_face_normal[2];
554 ddi[i] = (pj[i]-
pi[i])/distf *srfan;
601 for (
int isou = 0; isou < 3; isou++) {
602 testi[isou] = grdpai[isou][0]*i_face_normal[0]
603 + grdpai[isou][1]*i_face_normal[1]
604 + grdpai[isou][2]*i_face_normal[2];
605 testj[isou] = grdpaj[isou][0]*i_face_normal[0]
606 + grdpaj[isou][1]*i_face_normal[1]
607 + grdpaj[isou][2]*i_face_normal[2];
608 testij[isou] = grdpai[isou][0]*grdpaj[isou][0]
609 + grdpai[isou][1]*grdpaj[isou][1]
610 + grdpai[isou][2]*grdpaj[isou][2];
613 dcc[isou] = gradi[isou][0]*i_face_normal[0]
614 + gradi[isou][1]*i_face_normal[1]
615 + gradi[isou][2]*i_face_normal[2];
616 ddi[isou] = testi[isou];
617 ddj[isou] = (pj[isou]-
pi[isou])/distf *srfan;
619 dcc[isou] = gradj[isou][0]*i_face_normal[0]
620 + gradj[isou][1]*i_face_normal[1]
621 + gradj[isou][2]*i_face_normal[2];
622 ddi[isou] = (pj[isou]-
pi[isou])/distf *srfan;
623 ddj[isou] = testj[isou];
671 for (
int ij = 0; ij < 6; ij++) {
672 *testij += gradsti[ij][0]*gradstj[ij][0]
673 + gradsti[ij][1]*gradstj[ij][1]
674 + gradsti[ij][2]*gradstj[ij][2];
675 testi[ij] = gradsti[ij][0]*i_face_normal[0]
676 + gradsti[ij][1]*i_face_normal[1]
677 + gradsti[ij][2]*i_face_normal[2];
678 testj[ij] = gradstj[ij][0]*i_face_normal[0]
679 + gradstj[ij][1]*i_face_normal[1]
680 + gradstj[ij][2]*i_face_normal[2];
683 dcc[ij] = gradi[ij][0]*i_face_normal[0]
684 + gradi[ij][1]*i_face_normal[1]
685 + gradi[ij][2]*i_face_normal[2];
687 ddj[ij] = (pj[ij]-
pi[ij])/distf *srfan;
689 dcc[ij] = gradj[ij][0]*i_face_normal[0]
690 + gradj[ij][1]*i_face_normal[1]
691 + gradj[ij][2]*i_face_normal[2];
692 ddi[ij] = (pj[ij]-
pi[ij])/distf *srfan;
732 0.5*(gradi[0] + gradj[0]),
733 0.5*(gradi[1] + gradj[1]),
734 0.5*(gradi[2] + gradj[2])};
778 for (
int isou = 0; isou < 3; isou++) {
780 for (
int jsou = 0; jsou < 3; jsou++)
781 dpvf[jsou] = 0.5*( gradi[isou][jsou]
782 + gradj[isou][jsou]);
791 pip[isou] =
pi[isou] + recoi[isou];
793 pjp[isou] = pj[isou] + recoj[isou];
833 for (
int isou = 0; isou < 6; isou++) {
835 for (
int jsou = 0; jsou < 3; jsou++)
836 dpvf[jsou] = 0.5*( gradi[isou][jsou]
837 + gradj[isou][jsou]);
845 pip[isou] =
pi[isou] + recoi[isou];
847 pjp[isou] = pj[isou] + recoj[isou];
883 *pir =
pi/relaxp - (1.-relaxp)/relaxp * pia;
884 *pjr = pj/relaxp - (1.-relaxp)/relaxp * pja;
886 *pipr = *pir + recoi;
887 *pjpr = *pjr + recoj;
921 for (
int isou = 0; isou < 3; isou++) {
922 pir[isou] =
pi[isou] /relaxp - (1.-relaxp)/relaxp * pia[isou];
923 pjr[isou] = pj[isou] /relaxp - (1.-relaxp)/relaxp * pja[isou];
925 pipr[isou] = pir[isou] + recoi[isou];
926 pjpr[isou] = pjr[isou] + recoj[isou];
961 for (
int isou = 0; isou < 6; isou++) {
962 pir[isou] =
pi[isou] /relaxp - (1.-relaxp)/relaxp * pia[isou];
963 pjr[isou] = pj[isou] /relaxp - (1.-relaxp)/relaxp * pja[isou];
965 pipr[isou] = pir[isou] + recoi[isou];
966 pjpr[isou] = pjr[isou] + recoj[isou];
999 for (
int isou = 0; isou < 3; isou++)
1016 for (
int isou = 0; isou < 6; isou++)
1037 *pf = pnd*pip + (1.-pnd)*pjp;
1057 for (
int isou = 0; isou < 3; isou++)
1058 pf[isou] = pnd*pip[isou] + (1.-pnd)*pjp[isou];
1078 for (
int isou = 0; isou < 6; isou++)
1079 pf[isou] = pnd*pip[isou] + (1.-pnd)*pjp[isou];
1103 df[0] = i_face_cog[0] - cell_cen[0];
1104 df[1] = i_face_cog[1] - cell_cen[1];
1105 df[2] = i_face_cog[2] - cell_cen[2];
1131 for (
int jsou = 0; jsou < 3; jsou++)
1132 df[jsou] = i_face_cog[jsou] - cell_cen[jsou];
1134 for (
int isou = 0; isou < 3; isou++) {
1135 pf[isou] =
p[isou] + df[0]*
grad[isou][0]
1136 + df[1]*
grad[isou][1]
1137 + df[2]*
grad[isou][2];
1163 for (
int jsou = 0; jsou < 3; jsou++)
1164 df[jsou] = i_face_cog[jsou] - cell_cen[jsou];
1166 for (
int isou = 0; isou < 6; isou++) {
1167 pf[isou] =
p[isou] + df[0]*
grad[isou][0]
1168 + df[1]*
grad[isou][1]
1169 + df[2]*
grad[isou][2];
1190 *pf = blencp * (*pf) + (1. - blencp) *
p;
1210 for (
int isou = 0; isou < 3; isou++)
1211 pf[isou] = blencp*(pf[isou])+(1.-blencp)*
p[isou];
1231 for (
int isou = 0; isou < 6; isou++)
1232 pf[isou] = blencp*(pf[isou])+(1.-blencp)*
p[isou];
1279 fluxij[1] += iconvp*xcppj*(
thetap*(flui*pifrj + fluj*pjfrj) - imasac*
i_massflux*pj);
1321 for (
int isou = 0; isou < 3; isou++) {
1323 fluxi[isou] += iconvp*(
thetap*(flui*pifri[isou] + fluj*pjfri[isou])
1325 fluxj[isou] += iconvp*(
thetap*(flui*pifrj[isou] + fluj*pjfrj[isou])
1369 for (
int isou = 0; isou < 6; isou++) {
1370 fluxi[isou] += iconvp*(
thetap*(flui*pifri[isou] + fluj*pjfri[isou])
1372 fluxj[isou] += iconvp*(
thetap*(flui*pifrj[isou] + fluj*pjfrj[isou])
1433 for (
int isou = 0; isou < 3; isou++) {
1466 for (
int isou = 0; isou < 6; isou++) {
1910 const double relaxp,
1911 const double blencp,
1984 }
else if (ischcp == 0) {
2091 const double relaxp,
2092 const double blencp,
2244 const double relaxp,
2245 const double blencp,
2398 const double blencp,
2447 }
else if (ischcp == 0) {
2463 }
else if (ischcp == 3) {
2493 hybrid_blend_interp =
fmin(hybrid_blend_i,hybrid_blend_j);
2494 *pif = hybrid_blend_interp*(*pif) + (1. - hybrid_blend_interp)*pif_up;
2495 *pjf = hybrid_blend_interp*(*pjf) + (1. - hybrid_blend_interp)*pjf_up;
2558 const double blencp,
2604 }
else if (ischcp == 3) {
2634 hybrid_blend_interp =
fmin(hybrid_blend_i,hybrid_blend_j);
2635 for (
int isou = 0; isou < 3; isou++) {
2636 pif[isou] = hybrid_blend_interp *pif[isou]
2637 + (1. - hybrid_blend_interp)*pif_up[isou];
2638 pjf[isou] = hybrid_blend_interp *pjf[isou]
2639 + (1. - hybrid_blend_interp)*pjf_up[isou];
2700 const double blencp,
2826 const double relaxp,
2827 const double blencp,
2828 const double blend_st,
2862 *upwind_switch =
false;
2925 }
else if (ischcp == 0) {
2982 if (tesqck <= 0. || testij <= 0.) {
2997 *upwind_switch =
true;
3078 const double relaxp,
3079 const double blencp,
3114 srfan = i_face_surf;
3155 for (isou = 0; isou < 3; isou++) {
3156 if (tesqck[isou]<=0. || testij[isou]<=0.) {
3170 *upwind_switch =
true;
3243 for (isou = 0; isou < 3; isou++) {
3306 const double relaxp,
3307 const double blencp,
3308 const double blend_st,
3380 for (isou = 0; isou < 3; isou++) {
3436 if (tesqck <= 0. || testij <= 0.) {
3450 *upwind_switch =
true;
3471 for (isou = 0; isou < 3; isou++) {
3534 const double relaxp,
3535 const double blencp,
3536 const double blend_st,
3608 for (isou = 0; isou < 6; isou++) {
3664 if (tesqck <= 0. || testij <= 0.) {
3679 *upwind_switch =
true;
3702 for (isou = 0; isou < 6; isou++) {
3760 const double blencp,
3761 const double blend_st,
3790 *upwind_switch =
false;
3833 }
else if (ischcp == 0) {
3870 if (tesqck<=0. || testij<=0.) {
3879 *upwind_switch =
true;
3983 const cs_real_t dist_du = dist_dc + dist_cu;
3989 const cs_real_t grad2c = ((p_d - p_c)/dist_dc - gradc)/dist_dc;
3991 cs_real_t p_u = p_c + (grad2c*dist_cu - gradc)*dist_cu;
3995 const cs_real_t nvf_r_f = (dist_fc+dist_cu)/dist_du;
3996 const cs_real_t nvf_r_c = dist_cu/dist_du;
4003 if (
CS_ABS(p_d-p_u) <= _small) {
4007 const cs_real_t nvf_p_c = (p_c - p_u)/(p_d - p_u);
4009 if (nvf_p_c <= 0. || nvf_p_c >= 1.) {
4031 *pif = p_u + nvf_p_f*(p_d - p_u);
4077 const double blencp,
4105 srfan = i_face_surf;
4136 for (isou = 0; isou < 3; isou++) {
4137 if (tesqck[isou]<=0. || testij[isou]<=0.) {
4147 *upwind_switch =
true;
4197 for (isou = 0; isou < 3; isou++) {
4250 const double blencp,
4251 const double blend_st,
4303 for (
int isou = 0; isou < 3; isou++) {
4341 if (tesqck <= 0. || testij <= 0.) {
4350 *upwind_switch =
true;
4367 for (
int isou = 0; isou < 3; isou++) {
4420 const double blencp,
4421 const double blend_st,
4474 for (isou = 0; isou < 6; isou++) {
4510 if (tesqck <= 0. || testij <= 0.) {
4522 *upwind_switch =
true;
4539 for (isou = 0; isou < 6; isou++) {
4567 + gradi[2]*
diipb[2]);
4587 for (
int isou = 0; isou < 3; isou++) {
4589 + gradi[isou][1]*
diipb[1]
4590 + gradi[isou][2]*
diipb[2]);
4611 for (
int isou = 0; isou < 6; isou++) {
4613 + gradi[isou][1]*
diipb[1]
4614 + gradi[isou][2]*
diipb[2]);
4639 *pir =
pi/relaxp - (1.-relaxp)/relaxp*pia;
4640 *pipr = *pir + recoi;
4664 for (
int isou = 0; isou < 3; isou++) {
4665 pir[isou] =
pi[isou]/relaxp - (1.-relaxp)/relaxp*pia[isou];
4666 pipr[isou] = pir[isou] + recoi[isou];
4691 for (
int isou = 0; isou < 6; isou++) {
4692 pir[isou] =
pi[isou]/relaxp - (1.-relaxp)/relaxp*pia[isou];
4693 pipr[isou] = pir[isou] + recoi[isou];
4763 pfac =
inc*coface + cofbce*pipr;
4824 for (
int isou = 0; isou < 3; isou++) {
4826 for (
int jsou = 0; jsou < 3; jsou++) {
4827 pfac +=
coefbp[isou][jsou]*pipr[jsou];
4829 flux[isou] += iconvp*(
thetap*(flui*pir[isou] + fluj*pfac)
4837 for (
int isou = 0; isou < 3; isou++) {
4838 pfac =
inc*coface[isou];
4839 for (
int jsou = 0; jsou < 3; jsou++) {
4840 pfac += cofbce[isou][jsou]*pipr[jsou];
4842 flux[isou] += iconvp*(
thetap*pfac
4947 for (
int isou = 0; isou < 3; isou++) {
4948 pfac =
inc*coefa[isou];
4949 for (
int jsou = 0; jsou < 3; jsou++) {
4950 pfac += coefb[isou][jsou]*pipr[jsou];
4952 flux[isou] += iconvp*(
thetap*(flui*pir[isou] + fluj*pfac)
5003 for (
int isou = 0; isou < 6; isou++) {
5004 pfac =
inc*coefa[isou];
5005 for (
int jsou = 0; jsou < 6; jsou++) {
5006 pfac += coefb[isou][jsou]*pipr[jsou];
5008 flux[isou] += iconvp*(
thetap*(flui*pir[isou] + fluj*pfac)
5068 for (
int isou = 0; isou < 3; isou++) {
5069 pfacd =
inc*cofaf[isou];
5070 for (
int jsou = 0; jsou < 3; jsou++) {
5071 pfacd += cofbf[isou][jsou]*pipr[jsou];
5103 for (
int isou = 0; isou < 6; isou++) {
5104 pfacd =
inc*cofaf[isou];
5105 for (
int jsou = 0; jsou < 6; jsou++) {
5106 pfacd += cofbf[isou][jsou]*pipr[jsou];
5130 const double relaxp,
5171 const double relaxp,
5212 const double relaxp,
5292 for (
int isou = 0; isou < 3; isou++)
5293 pip[isou] =
pi[isou] + recoi[isou];
5323 for(
int isou = 0; isou< 6; isou++)
5324 pip[isou] =
pi[isou] + recoi[isou];
5370 for (
int k = 0;
k < 3;
k++)
static void cs_i_cd_unsteady_slope_test_vector_old(bool *upwind_switch, const int iconvp, const int ircflp, const int ischcp, const double blencp, const cs_real_t weight, const cs_real_t i_dist, const cs_real_t i_face_surf, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_normal, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_t i_massflux, const cs_real_33_t gradi, const cs_real_33_t gradj, const cs_real_33_t grdpai, const cs_real_33_t grdpaj, const cs_real_3_t pi, const cs_real_3_t pj, cs_real_t pif[3], cs_real_t pjf[3], cs_real_t pip[3], cs_real_t pjp[3])
DEPRECATED Handle preparation of internal face values for the fluxes computation in case of a unstead...
Definition: cs_convection_diffusion.h:4073
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const epsrgp
Definition: cs_convection_diffusion.h:5386
void const int * f_id
Definition: cs_gui.h:292
#define CS_ABS(a)
Definition: cs_defs.h:429
static void cs_i_cd_unsteady_nvd(const cs_nvd_type_t limiter, const cs_real_3_t cell_cen_c, const cs_real_3_t cell_cen_d, const cs_real_3_t i_face_normal, const cs_real_3_t i_face_cog, const cs_real_3_t gradv_c, const cs_real_t p_c, const cs_real_t p_d, const cs_real_t local_max_c, const cs_real_t local_min_c, const cs_real_t courant_c, cs_real_t *pif, cs_real_t *pjf)
Handle preparation of internal face values for the convection flux computation in case of an unsteady...
Definition: cs_convection_diffusion.h:3955
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const extrap
Definition: cs_convection_diffusion.h:5386
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const iwarnp
Definition: cs_convection_diffusion.h:5386
void cs_convection_diffusion_tensor(int idtvar, int f_id, const cs_var_cal_opt_t var_cal_opt, int icvflb, int inc, int imasac, cs_real_6_t *restrict pvar, const cs_real_6_t *restrict pvara, const cs_real_6_t coefa[], const cs_real_66_t coefb[], const cs_real_6_t cofaf[], const cs_real_66_t cofbf[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_6_t *restrict rhs)
Add the explicit part of the convection/diffusion terms of a transport equation of a vector field .
Definition: cs_convection_diffusion.c:5554
static cs_real_t cs_math_3_norm(const cs_real_t v[3])
Compute the euclidean norm of a vector of dimension 3.
Definition: cs_math.h:372
static void cs_slope_test(const cs_real_t pi, const cs_real_t pj, const cs_real_t distf, const cs_real_t srfan, const cs_real_t i_face_normal[3], const cs_real_t gradi[3], const cs_real_t gradj[3], const cs_real_t grdpai[3], const cs_real_t grdpaj[3], const cs_real_t i_massflux, cs_real_t *testij, cs_real_t *tesqck)
Compute slope test criteria at internal face between cell i and j.
Definition: cs_convection_diffusion.h:446
double precision, dimension(ncharm), save b1
Definition: cpincl.f90:233
void cs_slope_test_gradient_tensor(const int inc, const cs_halo_type_t halo_type, const cs_real_63_t *grad, cs_real_63_t *grdpa, const cs_real_6_t *pvar, const cs_real_6_t *coefa, const cs_real_66_t *coefb, const cs_real_t *i_massflux)
Compute the upwind gradient used in the slope tests.
Definition: cs_convection_diffusion.c:1364
static void cs_central_downwind_cells(const cs_lnum_t ii, const cs_lnum_t jj, const cs_real_t i_massflux, cs_lnum_t *ic, cs_lnum_t *id)
Determine the upwind and downwind sides of an internal face and matching cell indices.
Definition: cs_convection_diffusion.h:3917
void cs_convection_diffusion_thermal(int idtvar, int f_id, const cs_var_cal_opt_t var_cal_opt, int inc, int iccocg, int imasac, cs_real_t *restrict pvar, const cs_real_t *restrict pvara, const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t cofafp[], const cs_real_t cofbfp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t xcpp[], cs_real_t *restrict rhs)
Add the explicit part of the convection/diffusion terms of a transport equation of a scalar field su...
Definition: cs_convection_diffusion.c:6469
static void cs_b_compute_quantities_vector(const cs_real_3_t diipb, const cs_real_33_t gradi, const int ircflp, cs_real_t recoi[3])
Reconstruct values in I' at boundary cell i.
Definition: cs_convection_diffusion.h:4582
static void cs_b_upwind_flux_vector(const int iconvp, const cs_real_t thetap, const int imasac, const int inc, const int bc_type, const cs_real_3_t pi, const cs_real_3_t pir, const cs_real_3_t pipr, const cs_real_3_t coefa, const cs_real_33_t coefb, const cs_real_t b_massflux, cs_real_t flux[3])
Add convective flux (substracting the mass accumulation from it) to flux at boundary face....
Definition: cs_convection_diffusion.h:4924
static void cs_b_diff_flux_tensor(const int idiffp, const cs_real_t thetap, const int inc, const cs_real_6_t pipr, const cs_real_6_t cofaf, const cs_real_66_t cofbf, const cs_real_t b_visc, cs_real_t flux[6])
Add diffusive flux to flux at boundary face.
Definition: cs_convection_diffusion.h:5093
Definition: cs_convection_diffusion.h:94
static void cs_b_relax_c_val_vector(const double relaxp, const cs_real_3_t pi, const cs_real_3_t pia, const cs_real_3_t recoi, cs_real_t pir[3], cs_real_t pipr[3])
Compute relaxed values at boundary cell i.
Definition: cs_convection_diffusion.h:4657
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const iccocg
Definition: cs_convection_diffusion.h:5386
static void cs_i_cd_steady_tensor(const int ircflp, const int ischcp, const double relaxp, const double blencp, const cs_real_t weight, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_63_t gradi, const cs_real_63_t gradj, const cs_real_6_t pi, const cs_real_6_t pj, const cs_real_6_t pia, const cs_real_6_t pja, cs_real_t pifri[6], cs_real_t pifrj[6], cs_real_t pjfri[6], cs_real_t pjfrj[6], cs_real_t pip[6], cs_real_t pjp[6], cs_real_t pipr[6], cs_real_t pjpr[6])
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:2242
static cs_real_t cs_math_3_square_norm(const cs_real_t v[3])
Compute the square norm of a vector of 3 real values.
Definition: cs_math.h:388
void cs_max_limiter_building(int f_id, int inc, const cs_real_t rovsdt[])
Compute a coefficient for blending that ensures the positivity of the scalar.
Definition: cs_convection_diffusion.c:1510
static void cs_i_conv_flux_tensor(const int iconvp, const cs_real_t thetap, const int imasac, const cs_real_t pi[6], const cs_real_t pj[6], const cs_real_t pifri[6], const cs_real_t pifrj[6], const cs_real_t pjfri[6], const cs_real_t pjfrj[6], const cs_real_t i_massflux, cs_real_t fluxi[6], cs_real_t fluxj[6])
Add convective fluxes (substracting the mass accumulation from them) to fluxes at face ij.
Definition: cs_convection_diffusion.h:1351
static void cs_b_diff_flux_vector(const int idiffp, const cs_real_t thetap, const int inc, const cs_real_3_t pipr, const cs_real_3_t cofaf, const cs_real_33_t cofbf, const cs_real_t b_visc, cs_real_t flux[3])
Add diffusive flux to flux at boundary face.
Definition: cs_convection_diffusion.h:5058
static void cs_i_diff_flux_vector(const int idiffp, const cs_real_t thetap, const cs_real_t pip[3], const cs_real_t pjp[3], const cs_real_t pipr[3], const cs_real_t pjpr[3], const cs_real_t i_visc, cs_real_t fluxi[3], cs_real_t fluxj[3])
Add diffusive fluxes to fluxes at face ij.
Definition: cs_convection_diffusion.h:1423
#define restrict
Definition: cs_defs.h:127
Definition: cs_convection_diffusion.h:95
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:315
void CS_PROCF(itrmas, ITRMAS)(const cs_int_t *const f_id
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition: cs_defs.h:314
static void cs_blend_f_val_tensor(const double blencp, const cs_real_6_t p, cs_real_t pf[6])
Blend face values for a centered or SOLU scheme with face values for an upwind scheme.
Definition: cs_convection_diffusion.h:1227
static void cs_i_cd_unsteady_vector(const int ircflp, const int ischcp, const double blencp, const cs_real_t weight, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_cog, const cs_real_t hybrid_blend_i, const cs_real_t hybrid_blend_j, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_33_t gradi, const cs_real_33_t gradj, const cs_real_3_t pi, const cs_real_3_t pj, cs_real_t pif[3], cs_real_t pjf[3], cs_real_t pip[3], cs_real_t pjp[3])
Handle preparation of internal face values for the fluxes computation in case of an unsteady algorith...
Definition: cs_convection_diffusion.h:2556
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_t cs_real_t i_massflux[]
Definition: cs_convection_diffusion.h:5386
static void cs_i_conv_flux_vector(const int iconvp, const cs_real_t thetap, const int imasac, const cs_real_t pi[3], const cs_real_t pj[3], const cs_real_t pifri[3], const cs_real_t pifrj[3], const cs_real_t pjfri[3], const cs_real_t pjfrj[3], const cs_real_t i_massflux, cs_real_t fluxi[3], cs_real_t fluxj[3])
Add convective fluxes (substracting the mass accumulation from them) to fluxes at face ij.
Definition: cs_convection_diffusion.h:1303
Definition: cs_convection_diffusion.h:99
static void cs_i_cd_steady_slope_test(bool *upwind_switch, const int iconvp, const int ircflp, const int ischcp, const double relaxp, const double blencp, const double blend_st, const cs_real_t weight, const cs_real_t i_dist, const cs_real_t i_face_surf, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_normal, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_t i_massflux, const cs_real_3_t gradi, const cs_real_3_t gradj, const cs_real_3_t gradupi, const cs_real_3_t gradupj, const cs_real_3_t gradsti, const cs_real_3_t gradstj, const cs_real_t pi, const cs_real_t pj, const cs_real_t pia, const cs_real_t pja, cs_real_t *pifri, cs_real_t *pifrj, cs_real_t *pjfri, cs_real_t *pjfrj, cs_real_t *pip, cs_real_t *pjp, cs_real_t *pipr, cs_real_t *pjpr)
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:2822
static void cs_b_cd_steady(const int ircflp, const double relaxp, const cs_real_3_t diipb, const cs_real_3_t gradi, const cs_real_t pi, const cs_real_t pia, cs_real_t *pir, cs_real_t *pipr)
Handle preparation of boundary face values for the flux computation in case of a steady algorithm.
Definition: cs_convection_diffusion.h:5129
#define END_C_DECLS
Definition: cs_defs.h:468
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t const cs_real_t const cs_real_t cs_real_t cs_real_t cs_real_3_t grad[]
Definition: cs_gradient.h:93
static void cs_i_cd_steady_slope_test_vector(bool *upwind_switch, const int iconvp, const int ircflp, const int ischcp, const double relaxp, const double blencp, const double blend_st, const cs_real_t weight, const cs_real_t i_dist, const cs_real_t i_face_surf, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_normal, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_t i_massflux, const cs_real_33_t gradi, const cs_real_33_t gradj, const cs_real_33_t grdpai, const cs_real_33_t grdpaj, const cs_real_3_t pi, const cs_real_3_t pj, const cs_real_3_t pia, const cs_real_3_t pja, cs_real_t pifri[3], cs_real_t pifrj[3], cs_real_t pjfri[3], cs_real_t pjfrj[3], cs_real_t pip[3], cs_real_t pjp[3], cs_real_t pipr[3], cs_real_t pjpr[3])
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:3302
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t const cs_real_t const cs_real_3_t const cs_real_3_t coefav[]
Definition: cs_divergence.h:64
double precision pi
value with 16 digits
Definition: cstnum.f90:48
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_6_t viscel[]
Definition: cs_convection_diffusion.h:5418
static void cs_i_relax_c_val_vector(const double relaxp, const cs_real_3_t pia, const cs_real_3_t pja, const cs_real_3_t recoi, const cs_real_3_t recoj, const cs_real_3_t pi, const cs_real_3_t pj, cs_real_t pir[3], cs_real_t pjr[3], cs_real_t pipr[3], cs_real_t pjpr[3])
Compute relaxed values at cell i and j.
Definition: cs_convection_diffusion.h:909
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const nswrgp
Definition: cs_convection_diffusion.h:5386
static void cs_slope_test_vector_old(const cs_real_3_t pi, const cs_real_3_t pj, const cs_real_t distf, const cs_real_t srfan, const cs_real_3_t i_face_normal, const cs_real_33_t gradi, const cs_real_33_t gradj, const cs_real_33_t grdpai, const cs_real_33_t grdpaj, const cs_real_t i_massflux, cs_real_t testij[3], cs_real_t tesqck[3])
DEPRECATED Compute slope test criteria at internal face between cell i and j.
Definition: cs_convection_diffusion.h:583
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t b_visc[]
Definition: cs_convection_diffusion.h:5386
static void cs_i_relax_c_val(const double relaxp, const cs_real_t pia, const cs_real_t pja, const cs_real_t recoi, const cs_real_t recoj, const cs_real_t pi, const cs_real_t pj, cs_real_t *pir, cs_real_t *pjr, cs_real_t *pipr, cs_real_t *pjpr)
Compute relaxed values at cell i and j.
Definition: cs_convection_diffusion.h:871
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
void cs_math_3_length_unitv(const cs_real_t xa[3], const cs_real_t xb[3], cs_real_t *len, cs_real_3_t unitv)
Compute the length (euclidien norm) between two points xa and xb in a cartesian coordinate system of ...
Definition: cs_math.c:390
static cs_real_t cs_math_sq(cs_real_t x)
Compute the square of a real value.
Definition: cs_math.h:193
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cofbfp[]
Definition: cs_convection_diffusion.h:5386
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t i_visc[]
Definition: cs_convection_diffusion.h:5386
static void cs_i_compute_quantities_vector(const int ircflp, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_33_t gradi, const cs_real_33_t gradj, const cs_real_3_t pi, const cs_real_3_t pj, cs_real_t recoi[3], cs_real_t recoj[3], cs_real_t pip[3], cs_real_t pjp[3])
Reconstruct values in I' and J'.
Definition: cs_convection_diffusion.h:762
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t const cs_real_t const cs_real_3_t const cs_real_3_t const cs_real_33_t coefbv[]
Definition: cs_divergence.h:64
void cs_anisotropic_diffusion_tensor(int idtvar, int f_id, const cs_var_cal_opt_t var_cal_opt, int inc, cs_real_6_t *restrict pvar, const cs_real_6_t *restrict pvara, const cs_real_6_t coefa[], const cs_real_66_t coefb[], const cs_real_6_t cofaf[], const cs_real_66_t cofbf[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_6_t *restrict viscel, const cs_real_2_t weighf[], const cs_real_t weighb[], cs_real_6_t *restrict rhs)
Add the explicit part of the diffusion terms with a symmetric tensor diffusivity for a transport equa...
Definition: cs_convection_diffusion.c:9525
static void cs_blend_f_val(const double blencp, const cs_real_t p, cs_real_t *pf)
Blend face values for a centered or SOLU scheme with face values for an upwind scheme.
Definition: cs_convection_diffusion.h:1186
static void cs_b_diff_flux_coupling(int idiffp, cs_real_t pi, cs_real_t pj, cs_real_t b_visc, cs_real_t *fluxi)
Add diffusive flux to flux at an internal coupling face.
Definition: cs_convection_diffusion.h:5341
Definition: cs_convection_diffusion.h:89
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
static void cs_slope_test_tensor(const cs_real_t pi[6], const cs_real_t pj[6], const cs_real_t distf, const cs_real_t srfan, const cs_real_t i_face_normal[3], const cs_real_t gradi[6][3], const cs_real_t gradj[6][3], const cs_real_t gradsti[6][3], const cs_real_t gradstj[6][3], const cs_real_t i_massflux, cs_real_t *testij, cs_real_t *tesqck)
Compute slope test criteria at internal face between cell i and j.
Definition: cs_convection_diffusion.h:650
static cs_real_t cs_nvd_scheme_scalar(const cs_nvd_type_t limiter, const cs_real_t nvf_p_c, const cs_real_t nvf_r_f, const cs_real_t nvf_r_c)
Compute the normalised face scalar using the specified NVD scheme.
Definition: cs_convection_diffusion.h:126
static void cs_i_cd_steady_upwind(const int ircflp, const cs_real_t relaxp, const cs_real_t diipf[3], const cs_real_t djjpf[3], const cs_real_t gradi[3], const cs_real_t gradj[3], const cs_real_t pi, const cs_real_t pj, const cs_real_t pia, const cs_real_t pja, cs_real_t *pifri, cs_real_t *pifrj, cs_real_t *pjfri, cs_real_t *pjfrj, cs_real_t *pip, cs_real_t *pjp, cs_real_t *pipr, cs_real_t *pjpr)
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:1499
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_6_t const cs_real_2_t const cs_real_t weighb[]
Definition: cs_convection_diffusion.h:5418
static void cs_i_cd_unsteady_upwind_vector(const int ircflp, const cs_real_t diipf[3], const cs_real_t djjpf[3], const cs_real_t gradi[3][3], const cs_real_t gradj[3][3], const cs_real_t pi[3], const cs_real_t pj[3], cs_real_t pif[3], cs_real_t pjf[3], cs_real_t pip[3], cs_real_t pjp[3])
Handle preparation of internal face values for the fluxes computation in case of an unsteady algorith...
Definition: cs_convection_diffusion.h:1791
static void cs_i_cd_steady_upwind_vector(const int ircflp, const cs_real_t relaxp, const cs_real_t diipf[3], const cs_real_t djjpf[3], const cs_real_t gradi[3][3], const cs_real_t gradj[3][3], const cs_real_t pi[3], const cs_real_t pj[3], const cs_real_t pia[3], const cs_real_t pja[3], cs_real_t pifri[3], cs_real_t pifrj[3], cs_real_t pjfri[3], cs_real_t pjfrj[3], cs_real_t pip[3], cs_real_t pjp[3], cs_real_t pipr[3], cs_real_t pjpr[3])
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:1582
void cs_anisotropic_diffusion_scalar(int idtvar, int f_id, const cs_var_cal_opt_t var_cal_opt, int inc, int iccocg, cs_real_t *restrict pvar, const cs_real_t *restrict pvara, const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t cofafp[], const cs_real_t cofbfp[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_6_t *restrict viscel, const cs_real_2_t weighf[], const cs_real_t weighb[], cs_real_t *restrict rhs)
Add the explicit part of the diffusion terms with a symmetric tensor diffusivity for a transport equa...
Definition: cs_convection_diffusion.c:7622
static void cs_b_cd_steady_vector(const int ircflp, const double relaxp, const cs_real_3_t diipb, const cs_real_33_t gradi, const cs_real_3_t pi, const cs_real_3_t pia, cs_real_t pir[3], cs_real_t pipr[3])
Handle preparation of boundary face values for the flux computation in case of a steady algorithm.
Definition: cs_convection_diffusion.h:5170
double precision, dimension(ncharm), save b2
Definition: cpincl.f90:233
Definition: cs_mesh_quantities.h:90
static void cs_blend_f_val_vector(const double blencp, const cs_real_3_t p, cs_real_t pf[3])
Blend face values for a centered or SOLU scheme with face values for an upwind scheme.
Definition: cs_convection_diffusion.h:1206
static void cs_i_cd_unsteady_upwind_tensor(const int ircflp, const cs_real_t diipf[3], const cs_real_t djjpf[3], const cs_real_t gradi[6][3], const cs_real_t gradj[6][3], const cs_real_t pi[6], const cs_real_t pj[6], cs_real_t pif[6], cs_real_t pjf[6], cs_real_t pip[6], cs_real_t pjp[6])
Handle preparation of internal face values for the fluxes computation in case of an unsteady algorith...
Definition: cs_convection_diffusion.h:1841
static void cs_i_cd_steady_slope_test_vector_old(bool *upwind_switch, const int iconvp, const int ircflp, const int ischcp, const double relaxp, const double blencp, const cs_real_t weight, const cs_real_t i_dist, const cs_real_t i_face_surf, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_normal, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_t i_massflux, const cs_real_33_t gradi, const cs_real_33_t gradj, const cs_real_33_t grdpai, const cs_real_33_t grdpaj, const cs_real_3_t pi, const cs_real_3_t pj, const cs_real_3_t pia, const cs_real_3_t pja, cs_real_t pifri[3], cs_real_t pifrj[3], cs_real_t pjfri[3], cs_real_t pjfrj[3], cs_real_t pip[3], cs_real_t pjp[3], cs_real_t pipr[3], cs_real_t pjpr[3])
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:3074
static void cs_b_cd_unsteady(const int ircflp, const cs_real_3_t diipb, const cs_real_3_t gradi, const cs_real_t pi, cs_real_t *pip)
Handle preparation of boundary face values for the flux computation in case of an unsteady algorithm.
Definition: cs_convection_diffusion.h:5249
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_t cs_real_t diverg[]
Definition: cs_convection_diffusion.h:5453
void cs_slope_test_gradient_vector(const int inc, const cs_halo_type_t halo_type, const cs_real_33_t *grad, cs_real_33_t *grdpa, const cs_real_3_t *pvar, const cs_real_3_t *coefa, const cs_real_33_t *coefb, const cs_real_t *i_massflux)
Compute the upwind gradient used in the slope tests.
Definition: cs_convection_diffusion.c:1209
static void cs_b_relax_c_val_tensor(const double relaxp, const cs_real_6_t pi, const cs_real_6_t pia, const cs_real_6_t recoi, cs_real_t pir[6], cs_real_t pipr[6])
Compute relaxed values at boundary cell i.
Definition: cs_convection_diffusion.h:4684
static void cs_solu_f_val_vector(const cs_real_3_t cell_cen, const cs_real_3_t i_face_cog, const cs_real_33_t grad, const cs_real_3_t p, cs_real_t pf[3])
Prepare value at face ij by using a Second Order Linear Upwind scheme.
Definition: cs_convection_diffusion.h:1123
cs_nvd_type_t
Definition: cs_convection_diffusion.h:85
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_t cs_real_t cs_real_t b_massflux[]
Definition: cs_convection_diffusion.h:5386
void const char const char const cs_int_t const cs_int_t * idtvar
Definition: cs_time_plot.h:95
void cs_slope_test_gradient(int f_id, int inc, cs_halo_type_t halo_type, const cs_real_3_t *grad, cs_real_3_t *grdpa, const cs_real_t *pvar, const cs_real_t *coefap, const cs_real_t *coefbp, const cs_real_t *i_massflux)
Compute the upwind gradient used in the slope tests.
Definition: cs_convection_diffusion.c:933
Definition: cs_convection_diffusion.h:92
static void cs_slope_test_vector(const cs_real_t pi[3], const cs_real_t pj[3], const cs_real_t distf, const cs_real_t srfan, const cs_real_t i_face_normal[3], const cs_real_t gradi[3][3], const cs_real_t gradj[3][3], const cs_real_t gradsti[3][3], const cs_real_t gradstj[3][3], const cs_real_t i_massflux, cs_real_t *testij, cs_real_t *tesqck)
Compute slope test criteria at internal face between cell i and j.
Definition: cs_convection_diffusion.h:512
static void cs_i_diff_flux(const int idiffp, const cs_real_t thetap, const cs_real_t pip, const cs_real_t pjp, const cs_real_t pipr, const cs_real_t pjpr, const cs_real_t i_visc, cs_real_2_t fluxij)
Add diffusive fluxes to fluxes at face ij.
Definition: cs_convection_diffusion.h:1393
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t pvar[]
Definition: cs_convection_diffusion.h:5386
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const imligp
Definition: cs_convection_diffusion.h:5386
void cs_face_anisotropic_diffusion_potential(const int f_id, const cs_mesh_t *m, cs_mesh_quantities_t *fvq, int init, int inc, int imrgra, int iccocg, int nswrgp, int imligp, int ircflp, int iphydp, int iwgrp, int iwarnp, double epsrgp, double climgp, double extrap, cs_real_3_t *restrict frcxt, cs_real_t *restrict pvar, const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t cofafp[], const cs_real_t cofbfp[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_6_t *restrict viscel, const cs_real_2_t weighf[], const cs_real_t weighb[], cs_real_t *restrict i_massflux, cs_real_t *restrict b_massflux)
Add the explicit part of the pressure gradient term to the mass flux in case of anisotropic diffusion...
Definition: cs_convection_diffusion.c:10467
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t coefap[]
Definition: cs_convection_diffusion.h:5386
static void cs_upwind_f_val_tensor(const cs_real_6_t p, cs_real_t pf[6])
Prepare value at face ij by using an upwind scheme.
Definition: cs_convection_diffusion.h:1013
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t rovsdt[]
Definition: cs_matrix_building.h:65
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t xcpp[]
Definition: cs_matrix_building.h:65
Definition: cs_convection_diffusion.h:87
static void cs_i_cd_unsteady_slope_test(bool *upwind_switch, const int iconvp, const int ircflp, const int ischcp, const double blencp, const double blend_st, const cs_real_t weight, const cs_real_t i_dist, const cs_real_t i_face_surf, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_normal, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_t i_massflux, const cs_real_3_t gradi, const cs_real_3_t gradj, const cs_real_3_t gradupi, const cs_real_3_t gradupj, const cs_real_3_t gradsti, const cs_real_3_t gradstj, const cs_real_t pi, const cs_real_t pj, cs_real_t *pif, cs_real_t *pjf, cs_real_t *pip, cs_real_t *pjp)
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:3756
static void cs_i_cd_steady_upwind_tensor(const int ircflp, const cs_real_t relaxp, const cs_real_t diipf[3], const cs_real_t djjpf[3], const cs_real_t gradi[6][3], const cs_real_t gradj[6][3], const cs_real_t pi[6], const cs_real_t pj[6], const cs_real_t pia[6], const cs_real_t pja[6], cs_real_t pifri[6], cs_real_t pifrj[6], cs_real_t pjfri[6], cs_real_t pjfrj[6], cs_real_t pip[6], cs_real_t pjp[6], cs_real_t pipr[6], cs_real_t pjpr[6])
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:1665
static void cs_b_relax_c_val(const double relaxp, const cs_real_t pi, const cs_real_t pia, const cs_real_t recoi, cs_real_t *pir, cs_real_t *pipr)
Compute relaxed values at boundary cell i.
Definition: cs_convection_diffusion.h:4632
#define CS_MIN(a, b)
Definition: cs_defs.h:430
Definition: cs_convection_diffusion.h:88
static void cs_centered_f_val(const double pnd, const cs_real_t pip, const cs_real_t pjp, cs_real_t *pf)
Prepare value at face ij by using a centered scheme.
Definition: cs_convection_diffusion.h:1032
void const cs_int_t *const const cs_int_t *const const cs_int_t *const imrgra
Definition: cs_convection_diffusion.h:5386
Definition: cs_convection_diffusion.h:93
const cs_real_t cs_math_epzero
void const cs_int_t *const const cs_int_t *const inc
Definition: cs_convection_diffusion.h:5386
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const ircflp
Definition: cs_convection_diffusion.h:5418
static void cs_b_upwind_flux(const int iconvp, const cs_real_t thetap, const int imasac, const int inc, const int bc_type, const cs_real_t pi, const cs_real_t pir, const cs_real_t pipr, const cs_real_t coefap, const cs_real_t coefbp, const cs_real_t b_massflux, const cs_real_t xcpp, cs_real_t *flux)
Add convective flux (substracting the mass accumulation from it) to flux at boundary face....
Definition: cs_convection_diffusion.h:4872
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const climgp
Definition: cs_convection_diffusion.h:5386
static void cs_upwind_f_val(const cs_real_t p, cs_real_t *pf)
Prepare value at face ij by using an upwind scheme.
Definition: cs_convection_diffusion.h:980
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:317
static void cs_b_compute_quantities_tensor(const cs_real_3_t diipb, const cs_real_63_t gradi, const int ircflp, cs_real_t recoi[6])
Reconstruct values in I' at boundary cell i.
Definition: cs_convection_diffusion.h:4606
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t coefbp[]
Definition: cs_convection_diffusion.h:5386
Definition: cs_convection_diffusion.h:100
static void cs_i_cd_unsteady(const int ircflp, const int ischcp, const double blencp, const cs_real_t weight, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_cog, const cs_real_t hybrid_blend_i, const cs_real_t hybrid_blend_j, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_3_t gradi, const cs_real_3_t gradj, const cs_real_3_t gradupi, const cs_real_3_t gradupj, const cs_real_t pi, const cs_real_t pj, cs_real_t *pif, cs_real_t *pjf, cs_real_t *pip, cs_real_t *pjp)
Handle preparation of internal face values for the fluxes computation in case of a unsteady algorithm...
Definition: cs_convection_diffusion.h:2396
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
Definition: cs_convection_diffusion.h:96
void const cs_int_t *const init
Definition: cs_convection_diffusion.h:5386
static void cs_b_cd_steady_tensor(const int ircflp, const double relaxp, const cs_real_3_t diipb, const cs_real_63_t gradi, const cs_real_6_t pi, const cs_real_6_t pia, cs_real_t pir[6], cs_real_t pipr[6])
Handle preparation of boundary face values for the flux computation in case of a steady algorithm.
Definition: cs_convection_diffusion.h:5211
Definition: cs_convection_diffusion.h:91
static void cs_centered_f_val_vector(const double pnd, const cs_real_3_t pip, const cs_real_3_t pjp, cs_real_t pf[3])
Prepare value at face ij by using a centered scheme.
Definition: cs_convection_diffusion.h:1052
static cs_real_t cs_math_3_square_distance(const cs_real_t xa[3], const cs_real_t xb[3])
Compute the squared distance between two points xa and xb in a cartesian coordinate system of dimensi...
Definition: cs_math.h:304
void cs_face_diffusion_potential(const int f_id, const cs_mesh_t *m, cs_mesh_quantities_t *fvq, int init, int inc, int imrgra, int iccocg, int nswrgp, int imligp, int iphydp, int iwgrp, int iwarnp, double epsrgp, double climgp, double extrap, cs_real_3_t *restrict frcxt, cs_real_t *restrict pvar, const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t cofafp[], const cs_real_t cofbfp[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_t *restrict visel, cs_real_t *restrict i_massflux, cs_real_t *restrict b_massflux)
Update the face mass flux with the face pressure (or pressure increment, or pressure double increment...
Definition: cs_convection_diffusion.c:10113
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_t visel[]
Definition: cs_convection_diffusion.h:5386
static void cs_b_compute_quantities(const cs_real_3_t diipb, const cs_real_3_t gradi, const int ircflp, cs_real_t *recoi)
Reconstruct values in I' at boundary cell i.
Definition: cs_convection_diffusion.h:4560
static void cs_upwind_f_val_vector(const cs_real_3_t p, cs_real_t pf[3])
Prepare value at face ij by using an upwind scheme.
Definition: cs_convection_diffusion.h:996
static void cs_solu_f_val(const cs_real_3_t cell_cen, const cs_real_3_t i_face_cog, const cs_real_3_t grad, const cs_real_t p, cs_real_t *pf)
Prepare value at face ij by using a Second Order Linear Upwind scheme.
Definition: cs_convection_diffusion.h:1095
static void cs_b_upwind_flux_tensor(const int iconvp, const cs_real_t thetap, const int imasac, const int inc, const int bc_type, const cs_real_6_t pi, const cs_real_6_t pir, const cs_real_6_t pipr, const cs_real_6_t coefa, const cs_real_66_t coefb, const cs_real_t b_massflux, cs_real_t flux[6])
Add convective flux (substracting the mass accumulation from it) to flux at boundary face....
Definition: cs_convection_diffusion.h:4980
static void cs_solu_f_val_tensor(const cs_real_3_t cell_cen, const cs_real_3_t i_face_cog, const cs_real_63_t grad, const cs_real_6_t p, cs_real_t pf[6])
Prepare value at face ij by using a Second Order Linear Upwind scheme.
Definition: cs_convection_diffusion.h:1155
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_6_t const cs_real_2_t weighf[]
Definition: cs_convection_diffusion.h:5418
static void cs_b_diff_flux(const int idiffp, const cs_real_t thetap, const int inc, const cs_real_t pipr, const cs_real_t cofafp, const cs_real_t cofbfp, const cs_real_t b_visc, cs_real_t *flux)
Add diffusive flux to flux at boundary face.
Definition: cs_convection_diffusion.h:5029
static void cs_b_imposed_conv_flux_vector(int iconvp, cs_real_t thetap, int imasac, int inc, cs_int_t bc_type, int icvfli, const cs_real_t pi[restrict 3], const cs_real_t pir[restrict 3], const cs_real_t pipr[restrict 3], const cs_real_t coefap[restrict 3], const cs_real_t coefbp[restrict 3][3], const cs_real_t coface[restrict 3], const cs_real_t cofbce[restrict 3][3], cs_real_t b_massflux, cs_real_t flux[restrict 3])
Add convective flux (substracting the mass accumulation from it) to flux at boundary face....
Definition: cs_convection_diffusion.h:4794
static void cs_i_compute_quantities(const int ircflp, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_3_t gradi, const cs_real_3_t gradj, const cs_real_t pi, const cs_real_t pj, cs_real_t *recoi, cs_real_t *recoj, cs_real_t *pip, cs_real_t *pjp)
Reconstruct values in I' and J'.
Definition: cs_convection_diffusion.h:719
#define CS_UNUSED(x)
Definition: cs_defs.h:453
double precision, dimension(:,:), pointer diipb
Definition: mesh.f90:212
double precision, save fmin
Definition: coincl.f90:133
static void cs_i_cd_steady_slope_test_tensor(bool *upwind_switch, const int iconvp, const int ircflp, const int ischcp, const double relaxp, const double blencp, const double blend_st, const cs_real_t weight, const cs_real_t i_dist, const cs_real_t i_face_surf, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_normal, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_t i_massflux, const cs_real_63_t gradi, const cs_real_63_t gradj, const cs_real_63_t grdpai, const cs_real_63_t grdpaj, const cs_real_6_t pi, const cs_real_6_t pj, const cs_real_6_t pia, const cs_real_6_t pja, cs_real_t pifri[6], cs_real_t pifrj[6], cs_real_t pjfri[6], cs_real_t pjfrj[6], cs_real_t pip[6], cs_real_t pjp[6], cs_real_t pipr[6], cs_real_t pjpr[6])
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:3530
static void cs_i_cd_steady(const int ircflp, const int ischcp, const double relaxp, const double blencp, const cs_real_t weight, const cs_real_t cell_ceni[3], const cs_real_t cell_cenj[3], const cs_real_t i_face_cog[3], const cs_real_t diipf[3], const cs_real_t djjpf[3], const cs_real_t gradi[3], const cs_real_t gradj[3], const cs_real_t gradupi[3], const cs_real_t gradupj[3], const cs_real_t pi, const cs_real_t pj, const cs_real_t pia, const cs_real_t pja, cs_real_t *pifri, cs_real_t *pifrj, cs_real_t *pjfri, cs_real_t *pjfrj, cs_real_t *pip, cs_real_t *pjp, cs_real_t *pipr, cs_real_t *pjpr)
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:1908
static cs_real_t cs_math_3_dot_product(const cs_real_t u[3], const cs_real_t v[3])
Compute the dot product of two vectors of 3 real values.
Definition: cs_math.h:326
static void cs_i_cd_unsteady_tensor(const int ircflp, const int ischcp, const double blencp, const cs_real_t weight, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_63_t gradi, const cs_real_63_t gradj, const cs_real_6_t pi, const cs_real_6_t pj, cs_real_t pif[6], cs_real_t pjf[6], cs_real_t pip[6], cs_real_t pjp[6])
Handle preparation of internal face values for the fluxes computation in case of an unsteady algorith...
Definition: cs_convection_diffusion.h:2698
Definition: cs_parameters.h:145
static void cs_i_cd_unsteady_slope_test_vector(bool *upwind_switch, const int iconvp, const int ircflp, const int ischcp, const double blencp, const double blend_st, const cs_real_t weight, const cs_real_t i_dist, const cs_real_t i_face_surf, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_normal, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_t i_massflux, const cs_real_33_t gradi, const cs_real_33_t gradj, const cs_real_33_t grdpai, const cs_real_33_t grdpaj, const cs_real_3_t pi, const cs_real_3_t pj, cs_real_t pif[3], cs_real_t pjf[3], cs_real_t pip[3], cs_real_t pjp[3])
Handle preparation of internal face values for the fluxes computation in case of a unsteady algorithm...
Definition: cs_convection_diffusion.h:4246
cs_real_t cs_real_66_t[6][6]
6x6 matrix of floating-point values
Definition: cs_defs.h:322
static void cs_i_diff_flux_tensor(const int idiffp, const cs_real_t thetap, const cs_real_t pip[6], const cs_real_t pjp[6], const cs_real_t pipr[6], const cs_real_t pjpr[6], const cs_real_t i_visc, cs_real_t fluxi[6], cs_real_t fluxj[6])
Add diffusive fluxes to fluxes at face ij.
Definition: cs_convection_diffusion.h:1456
static void cs_i_compute_quantities_tensor(const int ircflp, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_63_t gradi, const cs_real_63_t gradj, const cs_real_6_t pi, const cs_real_6_t pj, cs_real_t recoi[6], cs_real_t recoj[6], cs_real_t pip[6], cs_real_t pjp[6])
Reconstruct values in I' and J'.
Definition: cs_convection_diffusion.h:817
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:321
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const iphydp
Definition: cs_convection_diffusion.h:5386
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t cs_real_t const cs_real_t const cs_real_t const cs_real_t cofafp[]
Definition: cs_convection_diffusion.h:5386
static void cs_i_conv_flux(const int iconvp, const cs_real_t thetap, const int imasac, const cs_real_t pi, const cs_real_t pj, const cs_real_t pifri, const cs_real_t pifrj, const cs_real_t pjfri, const cs_real_t pjfrj, const cs_real_t i_massflux, const cs_real_t xcppi, const cs_real_t xcppj, cs_real_2_t fluxij)
Add convective fluxes (substracting the mass accumulation from them) to fluxes at face ij.
Definition: cs_convection_diffusion.h:1259
void cs_diffusion_potential(const int f_id, const cs_mesh_t *m, cs_mesh_quantities_t *fvq, int init, int inc, int imrgra, int iccocg, int nswrgp, int imligp, int iphydp, int iwarnp, double epsrgp, double climgp, double extrap, cs_real_3_t *restrict frcxt, cs_real_t *restrict pvar, const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t cofafp[], const cs_real_t cofbfp[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_t visel[], cs_real_t *restrict diverg)
Update the cell mass flux divergence with the face pressure (or pressure increment,...
Definition: cs_convection_diffusion.c:10935
static void cs_b_diff_flux_coupling_vector(int idiffp, const cs_real_t pi[3], const cs_real_t pj[3], cs_real_t b_visc, cs_real_t fluxi[3])
Add diffusive flux to flux at an internal coupling face for a vector.
Definition: cs_convection_diffusion.h:5364
structure containing the variable calculation options.
Definition: cs_parameters.h:60
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:301
cs_halo_type_t
Definition: cs_halo.h:50
static void cs_i_relax_c_val_tensor(const cs_real_t relaxp, const cs_real_t pia[6], const cs_real_t pja[6], const cs_real_t recoi[6], const cs_real_t recoj[6], const cs_real_t pi[6], const cs_real_t pj[6], cs_real_t pir[6], cs_real_t pjr[6], cs_real_t pipr[6], cs_real_t pjpr[6])
Compute relaxed values at cell i and j.
Definition: cs_convection_diffusion.h:949
void cs_upwind_gradient(const int f_id, const int inc, const cs_halo_type_t halo_type, const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t *restrict pvar, cs_real_3_t *restrict grdpa)
Compute the upwind gradient in order to cope with SOLU schemes observed in the litterature.
Definition: cs_convection_diffusion.c:1077
void cs_convection_diffusion_scalar(int idtvar, int f_id, const cs_var_cal_opt_t var_cal_opt, int icvflb, int inc, int iccocg, int imasac, cs_real_t *restrict pvar, const cs_real_t *restrict pvara, const cs_int_t icvfli[], const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t cofafp[], const cs_real_t cofbfp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_t *restrict rhs)
Add the explicit part of the convection/diffusion terms of a standard transport equation of a scalar ...
Definition: cs_convection_diffusion.c:1661
static void cs_b_cd_unsteady_vector(const int ircflp, const cs_real_3_t diipb, const cs_real_33_t gradi, const cs_real_3_t pi, cs_real_t pip[3])
Handle preparation of boundary face values for the flux computation in case of a steady algorithm.
Definition: cs_convection_diffusion.h:5279
void cs_anisotropic_diffusion_potential(const int f_id, const cs_mesh_t *m, cs_mesh_quantities_t *fvq, int init, int inc, int imrgra, int iccocg, int nswrgp, int imligp, int ircflp, int iphydp, int iwarnp, double epsrgp, double climgp, double extrap, cs_real_3_t *restrict frcxt, cs_real_t *restrict pvar, const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t cofafp[], const cs_real_t cofbfp[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_6_t *restrict viscel, const cs_real_2_t weighf[], const cs_real_t weighb[], cs_real_t *restrict diverg)
Add the explicit part of the divergence of the mass flux due to the pressure gradient (routine analog...
Definition: cs_convection_diffusion.c:11311
void const int * idiffp
Definition: cs_matrix_building.h:65
void cs_anisotropic_right_diffusion_vector(int idtvar, int f_id, const cs_var_cal_opt_t var_cal_opt, int inc, cs_real_3_t *restrict pvar, const cs_real_3_t *restrict pvara, const cs_real_3_t coefav[], const cs_real_33_t coefbv[], const cs_real_3_t cofafv[], const cs_real_33_t cofbfv[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_6_t *restrict viscel, const cs_real_2_t weighf[], const cs_real_t weighb[], cs_real_3_t *restrict rhs)
Add explicit part of the terms of diffusion by a right-multiplying symmetric tensorial diffusivity fo...
Definition: cs_convection_diffusion.c:8854
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const iwgrp
Definition: cs_convection_diffusion.h:5386
static void cs_b_imposed_conv_flux(int iconvp, cs_real_t thetap, int imasac, int inc, cs_int_t bc_type, int icvfli, cs_real_t pi, cs_real_t pir, cs_real_t pipr, cs_real_t coefap, cs_real_t coefbp, cs_real_t coface, cs_real_t cofbce, cs_real_t b_massflux, cs_real_t xcpp, cs_real_t *flux)
Add convective flux (substracting the mass accumulation from it) to flux at boundary face....
Definition: cs_convection_diffusion.h:4724
static void cs_centered_f_val_tensor(const double pnd, const cs_real_6_t pip, const cs_real_6_t pjp, cs_real_t pf[6])
Prepare value at face ij by using a centered scheme.
Definition: cs_convection_diffusion.h:1073
#define CS_MAX(a, b)
Definition: cs_defs.h:431
void const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_int_t *const const cs_real_t *const const cs_real_t *const const cs_real_t *const cs_real_3_t frcxt[]
Definition: cs_convection_diffusion.h:5386
Definition: cs_convection_diffusion.h:98
void cs_convection_diffusion_vector(int idtvar, int f_id, const cs_var_cal_opt_t var_cal_opt, int icvflb, int inc, int ivisep, int imasac, cs_real_3_t *restrict pvar, const cs_real_3_t *restrict pvara, const cs_int_t icvfli[], const cs_real_3_t coefav[], const cs_real_33_t coefbv[], const cs_real_3_t cofafv[], const cs_real_33_t cofbfv[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t secvif[], const cs_real_t secvib[], cs_real_3_t *restrict rhs)
Add the explicit part of the convection/diffusion terms of a transport equation of a vector field .
Definition: cs_convection_diffusion.c:4007
static cs_real_t cs_nvd_vof_scheme_scalar(const cs_nvd_type_t limiter, const cs_real_3_t i_face_normal, const cs_real_t nvf_p_c, const cs_real_t nvf_r_f, const cs_real_t nvf_r_c, const cs_real_3_t gradv_c, const cs_real_t c_courant)
Compute the normalised face scalar using the specified NVD scheme for the case of a Volume-of-Fluid (...
Definition: cs_convection_diffusion.h:311
static void cs_i_cd_unsteady_upwind(const int ircflp, const cs_real_t diipf[3], const cs_real_t djjpf[3], const cs_real_t gradi[3], const cs_real_t gradj[3], const cs_real_t pi, const cs_real_t pj, cs_real_t *pif, cs_real_t *pjf, cs_real_t *pip, cs_real_t *pjp)
Handle preparation of internal face values for the fluxes computation in case of an unsteady algorith...
Definition: cs_convection_diffusion.h:1741
Definition: cs_convection_diffusion.h:90
cs_real_t cs_real_63_t[6][3]
Definition: cs_defs.h:327
void const int const int const int const cs_real_t * thetap
Definition: cs_matrix_building.h:65
void cs_face_convection_scalar(int idtvar, int f_id, const cs_var_cal_opt_t var_cal_opt, int icvflb, int inc, int iccocg, int imasac, cs_real_t *restrict pvar, const cs_real_t *restrict pvara, const cs_int_t icvfli[], const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], cs_real_2_t i_conv_flux[], cs_real_t b_conv_flux[])
Update face flux with convection contribution of a standard transport equation of a scalar field .
Definition: cs_convection_diffusion.c:2940
static void cs_i_cd_unsteady_slope_test_tensor(bool *upwind_switch, const int iconvp, const int ircflp, const int ischcp, const double blencp, const double blend_st, const cs_real_t weight, const cs_real_t i_dist, const cs_real_t i_face_surf, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_normal, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_t i_massflux, const cs_real_63_t gradi, const cs_real_63_t gradj, const cs_real_63_t grdpai, const cs_real_63_t grdpaj, const cs_real_6_t pi, const cs_real_6_t pj, cs_real_t pif[6], cs_real_t pjf[6], cs_real_t pip[6], cs_real_t pjp[6])
Handle preparation of internal face values for the fluxes computation in case of a unsteady algorithm...
Definition: cs_convection_diffusion.h:4416
static void cs_i_cd_steady_vector(const int ircflp, const int ischcp, const double relaxp, const double blencp, const cs_real_t weight, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_cog, const cs_real_3_t diipf, const cs_real_3_t djjpf, const cs_real_33_t gradi, const cs_real_33_t gradj, const cs_real_3_t pi, const cs_real_3_t pj, const cs_real_3_t pia, const cs_real_3_t pja, cs_real_t pifri[3], cs_real_t pifrj[3], cs_real_t pjfri[3], cs_real_t pjfrj[3], cs_real_t pip[3], cs_real_t pjp[3], cs_real_t pipr[3], cs_real_t pjpr[3])
Handle preparation of internal face values for the fluxes computation in case of a steady algorithm a...
Definition: cs_convection_diffusion.h:2089
Definition: cs_convection_diffusion.h:97
void cs_anisotropic_left_diffusion_vector(int idtvar, int f_id, const cs_var_cal_opt_t var_cal_opt, int inc, int ivisep, cs_real_3_t *restrict pvar, const cs_real_3_t *restrict pvara, const cs_real_3_t coefav[], const cs_real_33_t coefbv[], const cs_real_3_t cofafv[], const cs_real_33_t cofbfv[], const cs_real_33_t i_visc[], const cs_real_t b_visc[], const cs_real_t secvif[], cs_real_3_t *restrict rhs)
Add explicit part of the terms of diffusion by a left-multiplying symmetric tensorial diffusivity for...
Definition: cs_convection_diffusion.c:8334
Definition: cs_field_pointer.h:70
static void cs_b_cd_unsteady_tensor(const int ircflp, const cs_real_3_t diipb, const cs_real_63_t gradi, const cs_real_6_t pi, cs_real_t pip[6])
Handle preparation of boundary face values for the flux computation in case of a steady algorithm.
Definition: cs_convection_diffusion.h:5310
Definition: cs_field_pointer.h:67
integer, dimension(:), allocatable icvfli
boundary convection flux indicator of a Rusanov or an analytical flux (some boundary contributions of...
Definition: cfpoin.f90:52