Evaluation of the velocity gradient in the cartesian directions Du_x: traceFieldsAdded[17] Du_y: traceFieldsAdded[18] Du_z: traceFieldsAdded[19] Dv_x: traceFieldsAdded[20] Dv_y: traceFieldsAdded[21] Dv_z: traceFieldsAdded[22] Dw_x: traceFieldsAdded[23] Dw_y: traceFieldsAdded[24] Dw_z: traceFieldsAdded[25]
65{
66 string fname = std::string(argv[2]);
67 int fdot = fname.find_last_of('.');
68 if (fdot != std::string::npos)
69 {
70 string ending = fname.substr(fdot);
71
72
73
74
75 if (ending == ".chk" || ending == ".fld")
76 {
77 fname = fname.substr(0, fdot);
78 }
79 }
80
81 fname = fname + ".txt";
82
83 int cnt;
84 int id1, id2;
85 int i, j, n, e, b;
87
88 int nBndEdgePts, nBndEdges, nBndRegions;
89
90 if (argc < 3)
91 {
92 fprintf(stderr, "Usage: ExtractSurface3DCFS meshfile fieldFile\n");
93 fprintf(stderr,
94 "Extracts a surface from a 3D fld file"
95 "(only for CompressibleFlowSolver and purely 3D .fld files)\n");
96 exit(1);
97 }
98
100 LibUtilities::SessionReader::CreateInstance(3, argv);
102 SpatialDomains::MeshGraphIO::Read(vSession);
103
104 std::string m_ViscosityType;
105
115
116 int m_spacedim = 3;
117 int nDimensions = m_spacedim;
118 int phys_offset;
119
120
121 ASSERTL0(vSession->DefinesParameter(
"Gamma"),
122 "Compressible flow sessions must define a Gamma parameter.");
123 vSession->LoadParameter("Gamma", m_gamma, 1.4);
124
125
126 ASSERTL0(vSession->DefinesParameter(
"pInf"),
127 "Compressible flow sessions must define a pInf parameter.");
128 vSession->LoadParameter("pInf", m_pInf, 101325);
129
130
131 ASSERTL0(vSession->DefinesParameter(
"rhoInf"),
132 "Compressible flow sessions must define a rhoInf parameter.");
133 vSession->LoadParameter(
"rhoInf",
m_rhoInf, 1.225);
134
135
136 ASSERTL0(vSession->DefinesParameter(
"uInf"),
137 "Compressible flow sessions must define a uInf parameter.");
138 vSession->LoadParameter(
"uInf",
m_uInf, 0.1);
139
140
141 if (m_spacedim == 2 || m_spacedim == 3)
142 {
143 ASSERTL0(vSession->DefinesParameter(
"vInf"),
144 "Compressible flow sessions must define a vInf parameter"
145 "for 2D/3D problems.");
146 vSession->LoadParameter(
"vInf",
m_vInf, 0.0);
147 }
148
149
150 if (m_spacedim == 3)
151 {
152 ASSERTL0(vSession->DefinesParameter(
"wInf"),
153 "Compressible flow sessions must define a wInf parameter"
154 "for 3D problems.");
155 vSession->LoadParameter("wInf", m_wInf, 0.0);
156 }
157
158 vSession->LoadParameter("GasConstant", m_gasConstant, 287.058);
159 vSession->LoadParameter(
"Twall",
m_Twall, 300.15);
160 vSession->LoadSolverInfo("ViscosityType", m_ViscosityType, "Constant");
161 vSession->LoadParameter(
"mu",
m_mu, 1.78e-05);
162
163
164
165 string fieldFile(argv[2]);
166 vector<LibUtilities::FieldDefinitionsSharedPtr> fieldDef;
167 vector<vector<NekDouble>> fieldData;
168
170
171
172
173
174 vector<vector<LibUtilities::PointsType>> pointsType;
175 for (i = 0; i < fieldDef.size(); ++i)
176 {
177 vector<LibUtilities::PointsType> ptype;
178 for (j = 0; j < 3; ++j)
179 {
181 }
182 pointsType.push_back(ptype);
183 }
184 graphShPt->SetExpansionInfo(fieldDef, pointsType);
185
186
187
188
189
190 int nfields = fieldDef[0]->m_fields.size();
193
194 for (i = 0; i < pFields.size(); i++)
195 {
196 pFields[i] =
198 vSession, graphShPt, vSession->GetVariable(i));
199 }
200
203 graphShPt);
204
205 Exp[0] = Exp3D;
206
207 for (i = 1; i < nfields; ++i)
208 {
209 Exp[i] =
211 }
212
213
214 int nSurfacePts = 0;
215 if (pFields[0]->GetBndCondExpansions().size())
216 {
217 nSurfacePts = 0;
218 cnt = 0;
219 nBndRegions = pFields[0]->GetBndCondExpansions().size();
220 for (b = 0; b < nBndRegions; ++b)
221 {
222 nBndEdges = pFields[0]->GetBndCondExpansions()[b]->GetExpSize();
223 for (e = 0; e < nBndEdges; ++e)
224 {
225 nBndEdgePts = pFields[0]
226 ->GetBndCondExpansions()[b]
227 ->GetExp(e)
228 ->GetTotPoints();
229
230 if (pFields[0]->GetBndConditions()[b]->GetUserDefined() ==
231 "WallViscous" ||
232 pFields[0]->GetBndConditions()[b]->GetUserDefined() ==
233 "WallAdiabatic" ||
234 pFields[0]->GetBndConditions()[b]->GetUserDefined() ==
235 "Wall")
236 {
237 nSurfacePts += nBndEdgePts;
238 }
239 }
240 }
241 }
242
243 int nSolutionPts = pFields[0]->GetNpoints();
244 int nTracePts = pFields[0]->GetTrace()->GetTotPoints();
245 int nElements = pFields[0]->GetExpSize();
246
248
252
256
260
261 pFields[0]->GetCoords(x, y,
z);
262
263 pFields[0]->ExtractTracePhys(x, traceX);
264 pFields[0]->ExtractTracePhys(y, traceY);
265 pFields[0]->ExtractTracePhys(
z, traceZ);
266
267
268
269
273
274
275 for (j = 0; j < nfields; ++j)
276 {
280
281 for (i = 0; i < fieldData.size(); ++i)
282 {
283 Exp[j]->ExtractDataToCoeffs(fieldDef[i], fieldData[i],
284 fieldDef[i]->m_fields[j],
285 Exp[j]->UpdateCoeffs());
286 }
287 Exp[j]->BwdTrans(Exp[j]->GetCoeffs(), Exp[j]->UpdatePhys());
288 Vmath::Vcopy(nSolutionPts, Exp[j]->GetPhys(), 1, uFields[j], 1);
289 pFields[0]->ExtractTracePhys(uFields[j], traceFields[j]);
290 }
291
292
293 int nfieldsAdded = 34;
296
297 for (j = 0; j < nfieldsAdded; ++j)
298 {
301 }
302
303
304
305
306
307
308
309
310
311
312
313
314
315
317 for (i = 0; i < nDimensions; ++i)
318 {
320 }
321 pFields[0]->GetTrace()->GetNormals(m_traceNormals);
322
329
330 for (i = 0; i < nDimensions; ++i)
331 {
335 }
336
337
338
339
340 Vmath::Vcopy(nTracePts, &m_traceNormals[0][0], 1, &traceFieldsAdded[0][0],
341 1);
342
343
344 Vmath::Vcopy(nTracePts, &m_traceNormals[1][0], 1, &traceFieldsAdded[1][0],
345 1);
346
347
348 Vmath::Vcopy(nTracePts, &m_traceNormals[2][0], 1, &traceFieldsAdded[2][0],
349 1);
350
351
352
353 Vmath::Vadd(nTracePts, &m_traceNormals[0][0], 1, &tmpNorm[0], 1, &h[0][0],
354 1);
355
356 Vmath::Vcopy(nTracePts, &m_traceNormals[1][0], 1, &h[1][0], 1);
357
358 Vmath::Vcopy(nTracePts, &m_traceNormals[2][0], 1, &h[2][0], 1);
359
360
361 for (i = 0; i < m_spacedim; i++)
362 {
363 Vmath::Vvtvp(nTracePts, &h[i][0], 1, &h[i][0], 1, &NormH[0], 1,
364 &NormH[0], 1);
365 }
366
367
368 Vmath::Vmul(nTracePts, &h[0][0], 1, &h[1][0], 1, &tmpTrace[0], 1);
369
370 Vmath::Vdiv(nTracePts, &tmpTrace[0], 1, &NormH[0], 1, &tmpTrace[0], 1);
371
372 Vmath::Smul(nTracePts, -2.0, &tmpTrace[0], 1, &m_traceBinormals[0][0], 1);
373
374 Vmath::Vcopy(nTracePts, &m_traceBinormals[0][0], 1, &traceFieldsAdded[3][0],
375 1);
376
377
378 Vmath::Vmul(nTracePts, &h[1][0], 1, &h[1][0], 1, &tmpTrace[0], 1);
379
380 Vmath::Vdiv(nTracePts, &tmpTrace[0], 1, &NormH[0], 1, &tmpTrace[0], 1);
381
382 Vmath::Smul(nTracePts, -2.0, &tmpTrace[0], 1, &tmpTrace[0], 1);
383
384 Vmath::Vadd(nTracePts, &tmpTrace[0], 1, &tmpNorm[0], 1,
385 &m_traceBinormals[1][0], 1);
386
387 Vmath::Vcopy(nTracePts, &m_traceBinormals[1][0], 1, &traceFieldsAdded[4][0],
388 1);
389
390
391 Vmath::Vmul(nTracePts, &h[1][0], 1, &h[2][0], 1, &tmpTrace[0], 1);
392
393 Vmath::Vdiv(nTracePts, &tmpTrace[0], 1, &NormH[0], 1, &tmpTrace[0], 1);
394
395 Vmath::Smul(nTracePts, -2.0, &tmpTrace[0], 1, &m_traceBinormals[2][0], 1);
396
397 Vmath::Vcopy(nTracePts, &m_traceBinormals[2][0], 1, &traceFieldsAdded[5][0],
398 1);
399
400
401 Vmath::Vmul(nTracePts, &h[0][0], 1, &h[2][0], 1, &tmpTrace[0], 1);
402
403 Vmath::Vdiv(nTracePts, &tmpTrace[0], 1, &NormH[0], 1, &tmpTrace[0], 1);
404
405 Vmath::Smul(nTracePts, -2.0, &tmpTrace[0], 1, &m_traceTangents[0][0], 1);
406
407 Vmath::Vcopy(nTracePts, &m_traceTangents[0][0], 1, &traceFieldsAdded[6][0],
408 1);
409
410
411 Vmath::Vcopy(nTracePts, &m_traceBinormals[2][0], 1, &m_traceTangents[1][0],
412 1);
413
414 Vmath::Vcopy(nTracePts, &m_traceTangents[1][0], 1, &traceFieldsAdded[7][0],
415 1);
416
417
418 Vmath::Vmul(nTracePts, &h[2][0], 1, &h[2][0], 1, &tmpTrace[0], 1);
419
420 Vmath::Vdiv(nTracePts, &tmpTrace[0], 1, &NormH[0], 1, &tmpTrace[0], 1);
421
422 Vmath::Smul(nTracePts, -2.0, &tmpTrace[0], 1, &tmpTrace[0], 1);
423
424 Vmath::Vadd(nTracePts, &tmpTrace[0], 1, &tmpNorm[0], 1,
425 &m_traceTangents[2][0], 1);
426
427 Vmath::Vcopy(nTracePts, &m_traceTangents[2][0], 1, &traceFieldsAdded[8][0],
428 1);
429
430
431
432
433
434
437
438 for (i = 0; i < m_spacedim; i++)
439 {
440 Vmath::Vmul(nSolutionPts, &uFields[i + 1][0], 1, &uFields[i + 1][0], 1,
441 &tmp[0], 1);
442
443 Vmath::Smul(nSolutionPts, 0.5, &tmp[0], 1, &tmp[0], 1);
444
446 }
447
449 1);
450
453
455
456
457 pFields[0]->ExtractTracePhys(
pressure, traceFieldsAdded[9]);
458
459
460
461
462
463
465
467 &temperature[0], 1);
468
469 NekDouble GasConstantInv = 1.0 / m_gasConstant;
470 Vmath::Smul(nSolutionPts, GasConstantInv, &temperature[0], 1,
471 &temperature[0], 1);
472
473
474 pFields[0]->ExtractTracePhys(temperature, traceFieldsAdded[10]);
475
476
477
478
479
482
483 for (i = 0; i < nDimensions; ++i)
484 {
487 }
488
489 for (i = 0; i < nDimensions; ++i)
490 {
491 for (n = 0; n < nElements; n++)
492 {
493 phys_offset = pFields[0]->GetPhys_Offset(n);
494
495 pFields[i]->GetExp(n)->PhysDeriv(i, temperature + phys_offset,
496 auxArray =
497 Dtemperature[i] + phys_offset);
498 }
499
500 pFields[0]->ExtractTracePhys(Dtemperature[i], traceDtemperature[i]);
501 }
502
503 for (i = 0; i < nDimensions; ++i)
504 {
506 &traceDtemperature[i][0], 1, &tmp[0], 1);
507
508 Vmath::Vadd(nTracePts, &traceFieldsAdded[11][0], 1, &tmp[0], 1,
509 &traceFieldsAdded[11][0], 1);
510 }
511
512
513
514
515
516
517
518
519
522
523 for (i = 0; i < nDimensions; ++i)
524 {
527 }
528
529 for (i = 0; i < nDimensions; ++i)
530 {
531 for (n = 0; n < nElements; n++)
532 {
533 phys_offset = pFields[0]->GetPhys_Offset(n);
534
535 pFields[i]->GetExp(n)->PhysDeriv(i,
pressure + phys_offset,
536 auxArray =
537 Dpressure[i] + phys_offset);
538 }
539
540 pFields[0]->ExtractTracePhys(Dpressure[i], traceDpressure[i]);
541 }
542
543
544 for (i = 0; i < nDimensions; ++i)
545 {
546 Vmath::Vmul(nTracePts, &m_traceTangents[i][0], 1, &traceDpressure[i][0],
547 1, &tmp[0], 1);
548
549 Vmath::Vadd(nTracePts, &traceFieldsAdded[12][0], 1, &tmp[0], 1,
550 &traceFieldsAdded[12][0], 1);
551 }
552
553
554 for (i = 0; i < nDimensions; ++i)
555 {
557 &traceDpressure[i][0], 1, &tmp[0], 1);
558
559 Vmath::Vadd(nTracePts, &traceFieldsAdded[13][0], 1, &tmp[0], 1,
560 &traceFieldsAdded[13][0], 1);
561 }
562
563
564 Vmath::Vcopy(nTracePts, &traceDpressure[0][0], 1, &traceFieldsAdded[14][0],
565 1);
566
567
568 Vmath::Vcopy(nTracePts, &traceDpressure[1][0], 1, &traceFieldsAdded[15][0],
569 1);
570
571
572 Vmath::Vcopy(nTracePts, &traceDpressure[2][0], 1, &traceFieldsAdded[16][0],
573 1);
574
575
576
577
578
579
580
581
582
583
584
585
586
589 nDimensions);
591
592 for (i = 0; i < nDimensions; ++i)
593 {
597
598 Vmath::Vdiv(nSolutionPts, uFields[i + 1], 1, uFields[0], 1, velocity[i],
599 1);
600
601 for (j = 0; j < nDimensions; ++j)
602 {
605 }
606 }
607
608 for (i = 0; i < nDimensions; ++i)
609 {
610 for (j = 0; j < nDimensions; ++j)
611 {
612 for (n = 0; n < nElements; n++)
613 {
614 phys_offset = pFields[0]->GetPhys_Offset(n);
615
616 pFields[i]->GetExp(n)->PhysDeriv(j, velocity[i] + phys_offset,
617 auxArray = Dvelocity[i][j] +
618 phys_offset);
619 }
620
621
622 pFields[0]->ExtractTracePhys(Dvelocity[i][j], traceDvelocity[i][j]);
623 }
624 }
625
627 &traceFieldsAdded[17][0], 1);
629 &traceFieldsAdded[18][0], 1);
631 &traceFieldsAdded[19][0], 1);
633 &traceFieldsAdded[20][0], 1);
635 &traceFieldsAdded[21][0], 1);
637 &traceFieldsAdded[22][0], 1);
639 &traceFieldsAdded[23][0], 1);
641 &traceFieldsAdded[24][0], 1);
643 &traceFieldsAdded[25][0], 1);
644
645
646
647
648
649
650
651
652
653
654
656
657
661
662
663 if (m_ViscosityType == "Variable")
664 {
668
669 for (int i = 0; i < nSolutionPts; ++i)
670 {
671 ratio = temperature[i] / T_star;
672 mu[i] = mu_star * ratio *
sqrt(ratio) * (T_star + 110.0) /
673 (temperature[i] + 110.0);
674 }
675 }
676 else
677 {
679 }
680
681
684
685
686 Vmath::Smul(nSolutionPts, 2.0, &mu[0], 1, &mu2[0], 1);
687
688
689 Vmath::Vadd(nSolutionPts, &divVel[0], 1, &Dvelocity[0][0][0], 1, &divVel[0],
690 1);
691 Vmath::Vadd(nSolutionPts, &divVel[0], 1, &Dvelocity[1][1][0], 1, &divVel[0],
692 1);
693
694
695 Vmath::Smul(nSolutionPts, lambda, &divVel[0], 1, &divVel[0], 1);
696 Vmath::Vmul(nSolutionPts, &mu[0], 1, &divVel[0], 1, &divVel[0], 1);
697
698
699
700 for (j = 0; j < m_spacedim; ++j)
701 {
704
705 Vmath::Vmul(nSolutionPts, &mu2[0], 1, &Dvelocity[j][j][0], 1,
706 &temp[j][0], 1);
707
708 Vmath::Vadd(nSolutionPts, &temp[j][0], 1, &divVel[0], 1, &Sgg[j][0], 1);
709 }
710
711
715
716
717 Vmath::Vadd(nSolutionPts, &Dvelocity[0][1][0], 1, &Dvelocity[1][0][0], 1,
718 &Sxy[0], 1);
719
720
721 Vmath::Vadd(nSolutionPts, &Dvelocity[0][2][0], 1, &Dvelocity[2][0][0], 1,
722 &Sxz[0], 1);
723
724
725 Vmath::Vadd(nSolutionPts, &Dvelocity[1][2][0], 1, &Dvelocity[2][1][0], 1,
726 &Syz[0], 1);
727
728
729 Vmath::Vmul(nSolutionPts, &mu[0], 1, &Sxy[0], 1, &Sxy[0], 1);
730
731
732 Vmath::Vmul(nSolutionPts, &mu[0], 1, &Sxz[0], 1, &Sxz[0], 1);
733
734
735 Vmath::Vmul(nSolutionPts, &mu[0], 1, &Syz[0], 1, &Syz[0], 1);
736
737 pFields[0]->ExtractTracePhys(Sgg[0], traceFieldsAdded[26]);
738 pFields[0]->ExtractTracePhys(Sgg[1], traceFieldsAdded[27]);
739 pFields[0]->ExtractTracePhys(Sgg[2], traceFieldsAdded[28]);
740 pFields[0]->ExtractTracePhys(Sxy, traceFieldsAdded[29]);
741 pFields[0]->ExtractTracePhys(Sxz, traceFieldsAdded[30]);
742 pFields[0]->ExtractTracePhys(Syz, traceFieldsAdded[31]);
743
744
745
746
747
748 pFields[0]->ExtractTracePhys(mu, traceFieldsAdded[32]);
749
750
751
752
754
755
757
759 Vmath::Smul(nSolutionPts, gamma, soundspeed, 1, soundspeed, 1);
760 Vmath::Vsqrt(nSolutionPts, soundspeed, 1, soundspeed, 1);
761
762
764
765 for (int i = 0; i < m_spacedim; ++i)
766 {
767 Vmath::Vvtvp(nSolutionPts, uFields[i + 1], 1, uFields[i + 1], 1, mach,
768 1, mach, 1);
769 }
770
771 Vmath::Vdiv(nSolutionPts, mach, 1, uFields[0], 1, mach, 1);
772 Vmath::Vdiv(nSolutionPts, mach, 1, uFields[0], 1, mach, 1);
774 Vmath::Vdiv(nSolutionPts, mach, 1, soundspeed, 1, mach, 1);
775
776 pFields[0]->ExtractTracePhys(mach, traceFieldsAdded[33]);
777
778
779
780
781 if (pFields[0]->GetBndCondExpansions().size())
782 {
783 id1 = 0;
784 cnt = 0;
785 nBndRegions = pFields[0]->GetBndCondExpansions().size();
786 for (b = 0; b < nBndRegions; ++b)
787 {
788 nBndEdges = pFields[0]->GetBndCondExpansions()[b]->GetExpSize();
789 for (e = 0; e < nBndEdges; ++e)
790 {
791 nBndEdgePts = pFields[0]
792 ->GetBndCondExpansions()[b]
793 ->GetExp(e)
794 ->GetTotPoints();
795
796 id2 = pFields[0]->GetTrace()->GetPhys_Offset(
797 pFields[0]->GetTraceMap()->GetBndCondIDToGlobalTraceID(
798 cnt++));
799
800 if (pFields[0]->GetBndConditions()[b]->GetUserDefined() ==
801 "WallViscous" ||
802 pFields[0]->GetBndConditions()[b]->GetUserDefined() ==
803 "WallAdiabatic" ||
804 pFields[0]->GetBndConditions()[b]->GetUserDefined() ==
805 "Wall")
806 {
807
808 Vmath::Vcopy(nBndEdgePts, &traceX[id2], 1, &surfaceX[id1],
809 1);
810
811 Vmath::Vcopy(nBndEdgePts, &traceY[id2], 1, &surfaceY[id1],
812 1);
813
814 Vmath::Vcopy(nBndEdgePts, &traceZ[id2], 1, &surfaceZ[id1],
815 1);
816
817 id1 += nBndEdgePts;
818 }
819 }
820 }
821 }
822
823
824 if (pFields[0]->GetBndCondExpansions().size())
825 {
826
827 for (j = 0; j < nfields; ++j)
828 {
829 cout << "field " << j << endl;
830
831 id1 = 0;
832 cnt = 0;
833 nBndRegions = pFields[j]->GetBndCondExpansions().size();
834 for (b = 0; b < nBndRegions; ++b)
835 {
836 nBndEdges = pFields[j]->GetBndCondExpansions()[b]->GetExpSize();
837 for (e = 0; e < nBndEdges; ++e)
838 {
839 nBndEdgePts = pFields[j]
840 ->GetBndCondExpansions()[b]
841 ->GetExp(e)
842 ->GetTotPoints();
843
844 id2 = pFields[j]->GetTrace()->GetPhys_Offset(
845 pFields[j]->GetTraceMap()->GetBndCondIDToGlobalTraceID(
846 cnt++));
847
848 if (pFields[j]->GetBndConditions()[b]->GetUserDefined() ==
849 "WallViscous" ||
850 pFields[j]->GetBndConditions()[b]->GetUserDefined() ==
851 "WallAdiabatic" ||
852 pFields[j]->GetBndConditions()[b]->GetUserDefined() ==
853 "Wall")
854 {
856 &surfaceFields[j][id1], 1);
857
858 id1 += nBndEdgePts;
859 }
860 }
861 }
862 }
863 }
864
865
866 if (pFields[0]->GetBndCondExpansions().size())
867 {
868 for (j = 0; j < nfieldsAdded; ++j)
869 {
870 cout << "field added " << j << endl;
871
872 id1 = 0;
873 cnt = 0;
874 nBndRegions = pFields[0]->GetBndCondExpansions().size();
875 for (b = 0; b < nBndRegions; ++b)
876 {
877 nBndEdges = pFields[0]->GetBndCondExpansions()[b]->GetExpSize();
878 for (e = 0; e < nBndEdges; ++e)
879 {
880 nBndEdgePts = pFields[0]
881 ->GetBndCondExpansions()[b]
882 ->GetExp(e)
883 ->GetTotPoints();
884
885 id2 = pFields[0]->GetTrace()->GetPhys_Offset(
886 pFields[0]->GetTraceMap()->GetBndCondIDToGlobalTraceID(
887 cnt++));
888
889 if (pFields[0]->GetBndConditions()[b]->GetUserDefined() ==
890 "WallViscous" ||
891 pFields[0]->GetBndConditions()[b]->GetUserDefined() ==
892 "WallAdiabatic" ||
893 pFields[0]->GetBndConditions()[b]->GetUserDefined() ==
894 "Wall")
895 {
897 &surfaceFieldsAdded[j][id1], 1);
898
899 id1 += nBndEdgePts;
900 }
901 }
902 }
903 }
904 }
905
906
907
908
909
910
911 ofstream outfile;
912 outfile.open(fname.c_str());
913 outfile << "% x[m] "
914 << " \t"
915 << "y[m] "
916 << " \t"
917 << "z[m] "
918 << " \t"
919 << "nx[] "
920 << " \t"
921 << "ny[] "
922 << " \t"
923 << "nz[] "
924 << " \t"
925 << "bx[] "
926 << " \t"
927 << "by[] "
928 << " \t"
929 << "bz[] "
930 << " \t"
931 << "tx[] "
932 << " \t"
933 << "ty[] "
934 << " \t"
935 << "tz[] "
936 << " \t"
937 << "rho[kg/m^3] "
938 << " \t"
939 << "rhou[kg/(m^2 s)] "
940 << " \t"
941 << "rhov[kg/(m^2 s)] "
942 << " \t"
943 << "rhow[kg/(m^2 s)] "
944 << " \t"
945 << "E[Pa] "
946 << " \t"
947 << "p[Pa] "
948 << " \t"
949 << "T[k] "
950 << " \t"
951 << "dT/dn[k/m] "
952 << " \t"
953 << "dp/dT[Pa/m] "
954 << " \t"
955 << "dp/dB[Pa/m] "
956 << " \t"
957 << "dp/dx[Pa/m] "
958 << " \t"
959 << "dp/dy[Pa/m] "
960 << " \t"
961 << "dp/dz[Pa/m] "
962 << " \t"
963 << "du/dx[s^-1] "
964 << " \t"
965 << "du/dy[s^-1] "
966 << " \t"
967 << "du/dz[s^-1] "
968 << " \t"
969 << "dv/dx[s^-1] "
970 << " \t"
971 << "dv/dy[s^-1] "
972 << " \t"
973 << "dv/dz[s^-1] "
974 << " \t"
975 << "dw/dx[s^-1] "
976 << " \t"
977 << "dw/dy[s^-1] "
978 << " \t"
979 << "dw/dz[s^-1] "
980 << " \t"
981 << "tau_xx[Pa] "
982 << " \t"
983 << "tau_yy[Pa] "
984 << " \t"
985 << "tau_zz[Pa] "
986 << " \t"
987 << "tau_xy[Pa] "
988 << " \t"
989 << "tau_xz[Pa] "
990 << " \t"
991 << "tau_yz[Pa] "
992 << " \t"
993 << "mu[Pa s] "
994 << " \t"
995 << "M[] "
996 << " \t" << endl;
997 for (i = 0; i < nSurfacePts; ++i)
998 {
999 outfile
1000 << scientific << setw(17) << setprecision(16) << surfaceX[i]
1001 << " \t " << surfaceY[i] << " \t " << surfaceZ[i] << " \t "
1002 << surfaceFieldsAdded[0][i] << " \t " << surfaceFieldsAdded[1][i]
1003 << " \t " << surfaceFieldsAdded[2][i] << " \t "
1004 << surfaceFieldsAdded[3][i] << " \t " << surfaceFieldsAdded[4][i]
1005 << " \t " << surfaceFieldsAdded[5][i] << " \t "
1006 << surfaceFieldsAdded[6][i] << " \t " << surfaceFieldsAdded[7][i]
1007 << " \t " << surfaceFieldsAdded[8][i] << " \t "
1008 << surfaceFields[0][i] << " \t " << surfaceFields[1][i] << " \t "
1009 << surfaceFields[2][i] << " \t " << surfaceFields[3][i] << " \t "
1010 << surfaceFields[4][i] << " \t " << surfaceFieldsAdded[9][i]
1011 << " \t " << surfaceFieldsAdded[10][i] << " \t "
1012 << surfaceFieldsAdded[11][i] << " \t " << surfaceFieldsAdded[12][i]
1013 << " \t " << surfaceFieldsAdded[13][i] << " \t "
1014 << surfaceFieldsAdded[14][i] << " \t " << surfaceFieldsAdded[15][i]
1015 << " \t " << surfaceFieldsAdded[16][i] << " \t "
1016 << surfaceFieldsAdded[17][i] << " \t " << surfaceFieldsAdded[18][i]
1017 << " \t " << surfaceFieldsAdded[19][i] << " \t "
1018 << surfaceFieldsAdded[20][i] << " \t " << surfaceFieldsAdded[21][i]
1019 << " \t " << surfaceFieldsAdded[22][i] << " \t "
1020 << surfaceFieldsAdded[23][i] << " \t " << surfaceFieldsAdded[24][i]
1021 << " \t " << surfaceFieldsAdded[25][i] << " \t "
1022 << surfaceFieldsAdded[26][i] << " \t " << surfaceFieldsAdded[27][i]
1023 << " \t " << surfaceFieldsAdded[28][i] << " \t "
1024 << surfaceFieldsAdded[29][i] << " \t " << surfaceFieldsAdded[30][i]
1025 << " \t " << surfaceFieldsAdded[31][i] << " \t "
1026 << surfaceFieldsAdded[32][i] << " \t " << surfaceFieldsAdded[33][i]
1027 << " \t " << endl;
1028 }
1029 outfile << endl << endl;
1030 outfile.close();
1031
1032 return 0;
1033}
#define ASSERTL0(condition, msg)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
void Import(const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, FieldMetaDataMap &fieldinfomap, const Array< OneD, int > &ElementIDs)
This function allows for data to be imported from an FLD file when a session and/or communicator is n...
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ ePolyEvenlySpaced
1D Evenly-spaced points using Lagrange polynomial
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::vector< double > z(NPUPPER)
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
scalarT< T > sqrt(scalarT< T > in)