Pressure-gradient¶
Wall-normal relation¶
\[-
\dmompre{1}\]
225static int pressure (
226 const domain_t * domain,
227 const double * restrict p,
228 double * restrict src
229) {
230 const int isize = domain->mysizes[0];
231 const int jsize = domain->mysizes[1];
232#if NDIMS == 3
233 const int ksize = domain->mysizes[2];
234#endif
235 const double * restrict hxxf = domain->hxxf;
236 BEGIN
237 src[cnt] -= 1. / HXXF(i ) * (
238#if NDIMS == 2
239 - P(i-1, j )
240 + P(i , j )
241#else
242 - P(i-1, j , k )
243 + P(i , j , k )
244#endif
245 );
246 END
247 return 0;
248}
Stream-wise relation¶
\[-
\dmompre{2}\]
218static int pressure (
219 const domain_t * domain,
220 const double * restrict p,
221 double * restrict src
222) {
223 const int isize = domain->mysizes[0];
224 const int jsize = domain->mysizes[1];
225#if NDIMS == 3
226 const int ksize = domain->mysizes[2];
227#endif
228 const double hy = domain->hy;
229 BEGIN
230 src[cnt] -= 1. / hy * (
231#if NDIMS == 2
232 - P(i , j-1)
233 + P(i , j )
234#else
235 - P(i , j-1, k )
236 + P(i , j , k )
237#endif
238 );
239 END
240 return 0;
241}
Span-wise relation¶
\[-
\dmompre{3}\]
173static int pressure (
174 const domain_t * domain,
175 const double * restrict p,
176 double * restrict src
177) {
178 const int isize = domain->mysizes[0];
179 const int jsize = domain->mysizes[1];
180 const int ksize = domain->mysizes[2];
181 const double hz = domain->hz;
182 BEGIN
183 src[cnt] -= 1. / hz * (
184 - P(i , j , k-1)
185 + P(i , j , k )
186 );
187 END
188 return 0;
189}