|
42 | 42 | // xx/xx/2022: Extension of phase field to d3q27 option to move away from crappy q15 lattice.
|
43 | 43 | // xx/xx/2022: Development of geometric wetting B.C. option as well as existing surface energy.
|
44 | 44 | // xx/xx/2023: Code extension for wetting on curved boundaries.
|
| 45 | +// 30/01/2024: Thermocapillary support moved to TCLB overlay: https://github.com/TravisMitchell/thermocapillary |
45 | 46 |
|
46 | 47 | #include <math.h>
|
47 | 48 | #define PI 3.14159265
|
@@ -217,13 +218,8 @@ CudaDeviceFunction real_t calcMu(real_t C)
|
217 | 218 | myLaplace('lpPhi', 'PhaseF')
|
218 | 219 | ?>
|
219 | 220 | #endif
|
220 |
| - #ifdef OPTIONS_thermo |
221 |
| - mu = 4.0*(12.0*SurfaceTension(0,0,0)/IntWidth)*(C-PhaseField_l)*(C-PhaseField_h)*(C-pfavg) |
222 |
| - - (1.5 *SurfaceTension(0,0,0)*IntWidth) * lpPhi; |
223 |
| - #else |
224 |
| - mu = 4.0*(12.0*sigma/IntWidth)*(C-PhaseField_l)*(C-PhaseField_h)*(C-pfavg) |
225 |
| - - (1.5 *sigma*IntWidth) * lpPhi; |
226 |
| - #endif |
| 221 | + mu = 4.0*(12.0*sigma/IntWidth)*(C-PhaseField_l)*(C-PhaseField_h)*(C-pfavg) |
| 222 | + - (1.5 *sigma*IntWidth) * lpPhi; |
227 | 223 | return mu;
|
228 | 224 | }
|
229 | 225 |
|
@@ -288,35 +284,7 @@ CudaDeviceFunction void InitFromFieldsStage()
|
288 | 284 | }
|
289 | 285 |
|
290 | 286 | CudaDeviceFunction void specialCases_Init()
|
291 |
| -{ |
292 |
| - #ifdef OPTIONS_thermo |
293 |
| - Temp = T_init; |
294 |
| - if (fabs(dT) > 0){ |
295 |
| - Temp = T_init + dT*Y; |
296 |
| - } |
297 |
| - if (fabs(dTx) > 0){ |
298 |
| - Temp = T_init + dTx*X; |
299 |
| - } |
300 |
| - #ifdef OPTIONS_planarBenchmark |
301 |
| - if ( (NodeType & NODE_ADDITIONALS) == NODE_BWall) { //bottom wall |
302 |
| - real_t x, omega; |
303 |
| - x = (X-0.5) - myL; |
304 |
| - omega = 3.1415926535897 / myL; |
305 |
| - Temp = T_h + T_0 * cos(omega * x); |
306 |
| - printf("y,x=%.4lf,%.4lf\n", Y,x); |
307 |
| - } else if ( (NodeType & NODE_ADDITIONALS) == NODE_TWall) { |
308 |
| - Temp = T_c; |
309 |
| - printf("y,x=%.4lf,%.4lf\n", Y, X); |
310 |
| - } |
311 |
| - PhaseF = 0.5 + PLUSMINUS * (0.5) * tanh( (Y - MIDPOINT)/(IntWidth/2) ); |
312 |
| - #endif |
313 |
| - if (surfPower > 1) { |
314 |
| - SurfaceTension = sigma + sigma_TT*pow((Temp(0,0,0) - T_ref),surfPower) * (1.0/surfPower); |
315 |
| - } else { |
316 |
| - SurfaceTension = sigma + sigma_T*(Temp(0,0,0) - T_ref); |
317 |
| - } |
318 |
| - Cond = interp(PhaseF, k_h, k_l); |
319 |
| - #endif |
| 287 | +{ |
320 | 288 | // Pre-defined Initialisation patterns:
|
321 | 289 | // Diffuse interface sphere
|
322 | 290 | // BubbleType = -1 refers to light fluid bubble.
|
@@ -418,10 +386,6 @@ CudaDeviceFunction void Init_distributions()
|
418 | 386 | ?>
|
419 | 387 | pnorm = <?R C(sum(g)) ?>;
|
420 | 388 | PhaseF = <?R C(sum(h)) ?>;
|
421 |
| - #ifdef OPTIONS_thermo |
422 |
| - Temp = Temp(0,0,0); |
423 |
| - Cond = interp(PhaseF, k_h, k_l); |
424 |
| - #endif |
425 | 389 | #ifdef OPTIONS_OutFlow
|
426 | 390 | if ((NodeType & NODE_BOUNDARY) == NODE_EConvect){
|
427 | 391 | <?R if (Options$OutFlow){
|
@@ -526,38 +490,9 @@ CudaDeviceFunction void calc_Fb(real_t *fx, real_t *fy, real_t *fz, real_t rho){
|
526 | 490 | }
|
527 | 491 |
|
528 | 492 | CudaDeviceFunction void calc_Fs(real_t *fx, real_t *fy, real_t *fz, real_t mu, vector_t gPhi){
|
529 |
| - #ifdef OPTIONS_thermo |
530 |
| - Temp = Temp(0,0,0); |
531 |
| - SurfaceTension = SurfaceTension(0,0,0); |
532 |
| - Cond = Cond(0,0,0); |
533 |
| - real_t tmpSig, delta_s, dotTMP, magnPhi, magnPhi2; |
534 |
| - magnPhi = sqrt(gPhi.x*gPhi.x + gPhi.y*gPhi.y + gPhi.z*gPhi.z); |
535 |
| - magnPhi2 = magnPhi*magnPhi; |
536 |
| - vector_t gradT; |
537 |
| - <?R |
538 |
| - IsotropicGrad('gradT','Temp') |
539 |
| - ?> |
540 |
| - dotTMP = dotProduct(gradT,gPhi); |
541 |
| - if (surfPower < 2) { |
542 |
| - delta_s = 1.5*IntWidth*sigma_T; |
543 |
| - *fx = mu * gPhi.x + delta_s*( magnPhi2*gradT.x - dotTMP*gPhi.x ); |
544 |
| - *fy = mu * gPhi.y + delta_s*( magnPhi2*gradT.y - dotTMP*gPhi.y ); |
545 |
| - *fz = mu * gPhi.z + delta_s*( magnPhi2*gradT.z - dotTMP*gPhi.z ); |
546 |
| - } else { |
547 |
| - vector_t gradSig; |
548 |
| - <?R |
549 |
| - IsotropicGrad('gradSig','SurfaceTension') |
550 |
| - ?> |
551 |
| - delta_s = 1.5*IntWidth; |
552 |
| - *fx = mu * gPhi.x + delta_s*gradSig.x*( magnPhi2*gradT.x - dotTMP*gPhi.x ); |
553 |
| - *fy = mu * gPhi.y + delta_s*gradSig.y*( magnPhi2*gradT.y - dotTMP*gPhi.y ); |
554 |
| - *fz = mu * gPhi.z + delta_s*gradSig.z*( magnPhi2*gradT.z - dotTMP*gPhi.z ); |
555 |
| - } |
556 |
| - #else |
557 |
| - *fx = mu * gPhi.x; |
558 |
| - *fy = mu * gPhi.y; |
559 |
| - *fz = mu * gPhi.z; |
560 |
| - #endif |
| 493 | + *fx = mu * gPhi.x; |
| 494 | + *fy = mu * gPhi.y; |
| 495 | + *fz = mu * gPhi.z; |
561 | 496 | }
|
562 | 497 |
|
563 | 498 | #ifndef OPTIONS_BGK
|
@@ -836,13 +771,6 @@ CudaDeviceFunction void updateTrackers(real_t C){
|
836 | 771 | }
|
837 | 772 | }
|
838 | 773 | }
|
839 |
| -//#############// |
840 |
| -//######THERMOCAPILLARY UPDATE######// |
841 |
| -#ifdef OPTIONS_thermo |
842 |
| - <?RT models/multiphase/d3q27_pf_velocity/thermo.c.Rt ?> |
843 |
| -#endif |
844 |
| -//#############// |
845 |
| - |
846 | 774 |
|
847 | 775 | #ifdef OPTIONS_BGK
|
848 | 776 | CudaDeviceFunction void CollisionBGK()
|
|
0 commit comments