Nektar++
Loading...
Searching...
No Matches
VelocityCorrectionSchemeLevelSet.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: VelocityCorrectionSchemeLevelSet.cpp
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Level Set Velocity Correction Scheme for the Incompressible
32// Navier Stokes equations coupled with level-set method for two-phase flow
33//
34///////////////////////////////////////////////////////////////////////////////
35
43
44using namespace std;
45
46namespace Nektar
47{
48using namespace MultiRegions;
49
50std::string VCSLevelSet::className =
52 "VCSLevelSet", VCSLevelSet::create);
53
55 LibUtilities::SessionReader::RegisterEnumValue("SolverType", "VCSLevelSet",
57
58/**
59 * Constructor. Creates ...
60 *
61 * \param
62 * \param
63 */
66 : UnsteadySystem(pSession, pGraph),
67 VelocityCorrectionScheme(pSession, pGraph)
68{
69}
70
71void VCSLevelSet::v_InitObject(bool DeclareField)
72{
74
75 // Set up parameters for the Level set system
76 m_session->LoadParameter("epsilon", m_epsilon, 0.0);
77 m_session->LoadParameter("rhol", m_rhol, 1.0);
78 m_session->LoadParameter("rhof", m_rhof, 1.0);
79 m_session->LoadParameter("viscl", m_viscl, 1.0);
80 m_session->LoadParameter("viscf", m_viscf, 1.0);
81 m_session->LoadParameter("sigma", m_sigma, 0.0);
82 m_session->LoadParameter("gravity", m_gravity, 0.0);
83}
84
85/**
86 *
87 */
89{
90 AdvectionSystem::v_GenerateSummary(s);
91 SolverUtils::AddSummaryItem(s, "Splitting Scheme",
92 "Velocity correction Level Set");
93}
94
95/**
96 * Implicit part of the method - Poisson + nConv*Helmholtz
97 */
99 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
101 [[maybe_unused]] const NekDouble time, const NekDouble aii_Dt)
102{
103
104 // Check if user tries to setup flow rate in a multiphase context
105 if (m_flowrate > 0.0)
106 {
108 "Flow rate is not supported in multiphase flows. ");
109 }
110
111 int nvel = m_velocity.size();
112
113 // Substep the pressure boundary condition if using substepping
114 m_extrapolation->SubStepSetPressureBCs(inarray, aii_Dt, m_kinvis);
115
116 // Set up scalar(phi) forcing term for LS equation
118 timer.Start();
119 SetUpLevelSetForcing(inarray[nvel], m_F[nvel], aii_Dt);
120 timer.Stop();
121 timer.AccumulateRegion("Level Set Forcing");
122
123 // Solve Level Set System
124 timer.Start();
125 SolveLevelSet(m_F[nvel], inarray[nvel], outarray[nvel], outarray[nvel + 1],
126 outarray[nvel + 2], aii_Dt);
127 timer.Stop();
128 timer.AccumulateRegion("Level Set Solve");
129
130 // Set up forcing term for pressure Poisson equation
131 timer.Start();
132 SetUpPressureForcing(inarray, m_F, aii_Dt);
133 timer.Stop();
134 timer.AccumulateRegion("Pressure Forcing");
135
136 // Solve Pressure System
137 timer.Start();
138 SolvePressure(m_F[0]);
139 timer.Stop();
140 timer.AccumulateRegion("Pressure Solve");
141
142 // Set up forcing term for Helmholtz problems
143 timer.Start();
144 SetUpViscousForcing(inarray, m_F, aii_Dt);
145 timer.Stop();
146 timer.AccumulateRegion("Viscous Forcing");
147
148 // Solve velocity system
149 timer.Start();
150 SolveViscous(m_F, inarray, outarray, aii_Dt);
151 timer.Stop();
152 timer.AccumulateRegion("Viscous Solve");
153}
154
155/**
156 * Computes the forcing term that includes explicit artificial compression flux
157 * for level set solve.
158 */
161 const NekDouble aii_Dt)
162{
163
164 int i;
165 int nvel = m_velocity.size();
166 int physTot = m_fields[nvel]->GetTotPoints();
167
168 Vmath::Zero(physTot, Forcing, 1);
169
172 for (i = 0; i < nvel; ++i)
173 {
174 gradPhi[i] = Array<OneD, NekDouble>(physTot, 0.0);
175 IntNorm[i] = Array<OneD, NekDouble>(physTot, 0.0);
176 }
177
178 for (i = 0; i < nvel; ++i)
179 {
180 m_fields[nvel]->PhysDeriv(DirCartesianMap[i], fields, gradPhi[i]);
181 }
182
183 Array<OneD, NekDouble> gradPhiMag(physTot, 0.0);
184 Array<OneD, NekDouble> tmp(physTot, 0.0);
185 for (i = 0; i < nvel; ++i)
186 {
187 Vmath::Vpow(physTot, gradPhi[i], 1, 2.0, tmp, 1);
188 Vmath::Vadd(physTot, gradPhiMag, 1, tmp, 1, gradPhiMag, 1);
189 }
190 Vmath::Vsqrt(physTot, gradPhiMag, 1, gradPhiMag, 1);
191 Vmath::Vabs(physTot, gradPhiMag, 1, gradPhiMag, 1);
192
193 for (i = 0; i < nvel; ++i)
194 {
195 Vmath::Vdiv(physTot, gradPhi[i], 1, gradPhiMag, 1, IntNorm[i], 1);
196
197 for (int j = 0; j < physTot; ++j)
198 {
199 if (gradPhi[i][j] == 0 || gradPhiMag[j] == 0 ||
200 !std::isfinite(IntNorm[i][j]))
201 {
202 IntNorm[i][j] = 0;
203 }
204 }
205 }
206
207 Array<OneD, NekDouble> divIntNorm(physTot, 0.0);
208 Vmath::Zero(physTot, tmp, 1);
209 for (i = 0; i < nvel; ++i)
210 {
211 m_fields[nvel]->PhysDeriv(DirCartesianMap[i], IntNorm[i], tmp);
212 Vmath::Vadd(physTot, divIntNorm, 1, tmp, 1, divIntNorm, 1);
213 }
214
215 // phiOnePhiTwo = (phi)* (1-phi)
216 Array<OneD, NekDouble> oneMinusPhi(physTot, 0.0);
217 Array<OneD, NekDouble> phiOnephiTwo(physTot, 0.0);
218 Vmath::Ssub(physTot, 1.0, fields, 1, oneMinusPhi, 1);
219 Vmath::Vmul(physTot, fields, 1, oneMinusPhi, 1, phiOnephiTwo, 1);
220
221 // OneMinusTwoPhi = 1-2phi
222 Array<OneD, NekDouble> twoPhi(physTot, 0.0);
223 Array<OneD, NekDouble> oneMinusTwoPhi(physTot, 0.0);
224 Vmath::Smul(physTot, 2.0, fields, 1, twoPhi, 1);
225 Vmath::Ssub(physTot, 1.0, twoPhi, 1, oneMinusTwoPhi, 1);
226
227 // gDI = gradPhi(Dot)IntNorm
228 Array<OneD, NekDouble> gDI(physTot, 0.0);
229 Vmath::Zero(physTot, tmp, 1);
230 for (i = 0; i < nvel; ++i)
231 {
232 Vmath::Vmul(physTot, gradPhi[i], 1, IntNorm[i], 1, tmp, 1);
233 Vmath::Vadd(physTot, tmp, 1, gDI, 1, gDI, 1);
234 }
235
236 Array<OneD, NekDouble> Fc(physTot, 0.0);
237 Vmath::Vvtvvtp(physTot, phiOnephiTwo, 1, divIntNorm, 1, oneMinusTwoPhi, 1,
238 gDI, 1, Fc, 1);
239
240 NekDouble aii_dtinv = 1.0 / aii_Dt / m_epsilon;
241 Vmath::Svtsvtp(physTot, -aii_dtinv, fields, 1, 1.0 / m_epsilon, Fc, 1,
242 Forcing, 1);
243}
244
245/**
246 * Computes the forcing term that includes surface tension forces for the
247 * pressure poisson solve.
248 */
250 const Array<OneD, const Array<OneD, NekDouble>> &fields,
252{
253 size_t i;
254 size_t physTot = m_fields[0]->GetTotPoints();
255 size_t nvel = m_velocity.size();
256
257 m_fields[nvel]->BwdTrans(m_fields[nvel]->GetCoeffs(),
258 m_fields[nvel]->UpdatePhys());
259 // Surface tension components
264 for (int i = 0; i < nvel; ++i)
265 {
266 m_SurfTen[i] = Array<OneD, NekDouble>(physTot, 0.0);
267 gradPhi[i] = Array<OneD, NekDouble>(physTot, 0.0);
268 IntNorm[i] = Array<OneD, NekDouble>(physTot, 0.0);
269 SurfTen[i] = Array<OneD, NekDouble>(physTot, 0.0);
270 }
271
272 for (int i = 0; i < nvel; ++i)
273 {
275 m_fields[nvel]->GetPhys(), gradPhi[i]);
276 }
277
278 Array<OneD, NekDouble> gradPhiMag(physTot, 0.0);
279 Array<OneD, NekDouble> tmp(physTot, 0.0);
280 for (int i = 0; i < nvel; ++i)
281 {
282 Vmath::Vpow(physTot, gradPhi[i], 1, 2.0, tmp, 1);
283 Vmath::Vadd(physTot, gradPhiMag, 1, tmp, 1, gradPhiMag, 1);
284 }
285
286 Vmath::Vsqrt(physTot, gradPhiMag, 1, gradPhiMag, 1);
287 Vmath::Vabs(physTot, gradPhiMag, 1, gradPhiMag, 1);
288 for (int i = 0; i < nvel; ++i)
289 {
290 Vmath::Vdiv(physTot, gradPhi[i], 1, gradPhiMag, 1, IntNorm[i], 1);
291
292 for (int j = 0; j < physTot; ++j)
293 {
294 if (gradPhi[i][j] == 0 || gradPhiMag[j] == 0 ||
295 !std::isfinite(IntNorm[i][j]))
296 {
297 IntNorm[i][j] = 0;
298 }
299 }
300 }
301 Array<OneD, NekDouble> divIntNorm(physTot, 0.0);
302 Vmath::Zero(physTot, tmp, 1);
303 for (int i = 0; i < nvel; ++i)
304 {
306 IntNorm[i], tmp);
307 Vmath::Vadd(physTot, divIntNorm, 1, tmp, 1, divIntNorm, 1);
308 }
309 m_fields[nvel + 1]->BwdTrans(m_fields[nvel + 1]->GetCoeffs(),
310 m_fields[nvel + 1]->UpdatePhys());
311
312 // Calculate Surface tension components
313 for (int i = 0; i < nvel; ++i)
314 {
315 Vmath::Vmul(physTot, gradPhi[i], 1, divIntNorm, 1, SurfTen[i], 1);
316 Vmath::Smul(physTot, m_sigma, SurfTen[i], 1, SurfTen[i], 1);
317 Vmath::Vdiv(physTot, SurfTen[i], 1, m_fields[nvel + 1]->GetPhys(), 1,
318 SurfTen[i], 1);
319 }
320
321 // Fwd and Bwd transfer to make the function continuous
322 int ncoeffs = m_fields[0]->GetNcoeffs();
323 for (int i = 0; i < nvel; ++i)
324 {
325 Array<OneD, NekDouble> coeffs(ncoeffs, 0.0);
326 m_fields[nvel]->FwdTrans(SurfTen[i], coeffs);
327 m_fields[nvel]->BwdTrans(coeffs, SurfTen[i]);
328 Vmath::Vcopy(physTot, SurfTen[i], 1, m_SurfTen[i], 1);
329 }
330
331 // div(u*[i])/dt - div(ST[i])
332 Vmath::Zero(physTot, tmp, 1);
333 Vmath::Zero(physTot, Forcing[1], 1);
334 for (int i = 0; i < nvel; ++i)
335 {
337 SurfTen[i], tmp);
338 Vmath::Vadd(physTot, Forcing[1], 1, tmp, 1, Forcing[1], 1);
339 }
340
341 m_fields[0]->PhysDeriv(eX, fields[0], Forcing[0]);
342 Vmath::Zero(physTot, tmp, 1);
343 for (i = 1; i < nvel; ++i)
344 {
345 m_fields[i]->PhysDeriv(DirCartesianMap[i], fields[i], tmp);
346 Vmath::Vadd(physTot, tmp, 1, Forcing[0], 1, Forcing[0], 1);
347 }
348 Vmath::Smul(physTot, 1.0 / aii_Dt, Forcing[0], 1, Forcing[0], 1);
349
350 Vmath::Vsub(physTot, Forcing[0], 1, Forcing[1], 1, Forcing[0], 1);
351}
352
353/**
354 * Computes the forcing term that includes the updated pressure gradient, and
355 * surface tension forces.
356 */
358 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
360{
361 NekDouble aii_dtinv = 1.0 / aii_Dt;
362 size_t physTot = m_fields[0]->GetTotPoints();
363
364 // Grad p
365 m_pressure->BwdTrans(m_pressure->GetCoeffs(), m_pressure->UpdatePhys());
366
367 int nvel = m_velocity.size();
368 m_fields[nvel + 1]->BwdTrans(m_fields[nvel + 1]->GetCoeffs(),
369 m_fields[nvel + 1]->UpdatePhys());
370 if (nvel == 2)
371 {
372 m_pressure->PhysDeriv(m_pressure->GetPhys(), Forcing[m_velocity[0]],
373 Forcing[m_velocity[1]]);
374 Vmath::Vdiv(physTot, Forcing[m_velocity[0]], 1,
375 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[0]],
376 1);
377 Vmath::Vdiv(physTot, Forcing[m_velocity[1]], 1,
378 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[1]],
379 1);
380 }
381 else
382 {
383 m_pressure->PhysDeriv(m_pressure->GetPhys(), Forcing[m_velocity[0]],
385 Vmath::Vdiv(physTot, Forcing[m_velocity[0]], 1,
386 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[0]],
387 1);
388 Vmath::Vdiv(physTot, Forcing[m_velocity[1]], 1,
389 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[1]],
390 1);
391 Vmath::Vdiv(physTot, Forcing[m_velocity[2]], 1,
392 m_fields[nvel + 1]->GetPhys(), 1, Forcing[m_velocity[2]],
393 1);
394 }
395
396 // Add Surface tension
397 for (int i = 0; i < nvel; ++i)
398 {
399 Vmath::Vadd(physTot, Forcing[i], 1, m_SurfTen[i], 1, Forcing[i], 1);
400 }
401
402 // zero convective fields.
403 for (int i = nvel; i < m_nConvectiveFields; ++i)
404 {
405 Vmath::Zero(physTot, Forcing[i], 1);
406 }
407
408 // calculate 1/nudt and 1/nu to multiply with inarray and forcing
409 // respectively
410 Array<OneD, NekDouble> aiiDtInvVisc(physTot, 0.0);
411 Array<OneD, NekDouble> InvVisc(physTot, 0.0);
412 m_fields[nvel + 2]->BwdTrans(m_fields[nvel + 2]->GetCoeffs(),
413 m_fields[nvel + 2]->UpdatePhys());
414 Vmath::Sdiv(physTot, -aii_dtinv, m_fields[nvel + 2]->GetPhys(), 1,
415 aiiDtInvVisc, 1);
416 Vmath::Sdiv(physTot, 1.0, m_fields[nvel + 2]->GetPhys(), 1, InvVisc, 1);
417
418 for (int i = 0; i < nvel; ++i)
419 {
420 Vmath::Vvtvvtp(physTot, aiiDtInvVisc, 1, inarray[i], 1, InvVisc, 1,
421 Forcing[i], 1, Forcing[i], 1);
422 }
423}
424
425/**
426 * Solve level set system using a Helmholtz-type operator.
427 */
430 [[maybe_unused]] const Array<OneD, NekDouble> &inarray,
431 Array<OneD, NekDouble> &outarrayPhi, Array<OneD, NekDouble> &outarrayRho,
432 Array<OneD, NekDouble> &outarrayVisc, const NekDouble aii_Dt)
433{
434 int nvel = m_velocity.size();
435 int physTot = m_fields[nvel]->GetTotPoints();
439 factors[StdRegions::eFactorLambda] = 1.0 / aii_Dt / m_epsilon;
440
441 m_fields[nvel]->HelmSolve(Forcing, m_fields[nvel]->UpdateCoeffs(), factors,
442 varCoeffMap, varFactorsMap);
443 m_fields[nvel]->BwdTrans(m_fields[nvel]->GetCoeffs(), outarrayPhi);
444
445 // f= fluid(gas) l=liquid
446 // Rho = (rhol-rhof)*phi + rhof = rhol*phi +rhof*(1-phi)
447 Vmath::Smul(physTot, m_rhol - m_rhof, outarrayPhi, 1, outarrayRho, 1);
448 Vmath::Sadd(physTot, m_rhof, outarrayRho, 1, outarrayRho, 1);
449 m_fields[nvel + 1]->FwdTransLocalElmt(outarrayRho,
450 m_fields[nvel + 1]->UpdateCoeffs());
451
452 // DynVisc = (viscl/rhol - viscf/rhof)*phi + viscf/rhof
453 Vmath::Smul(physTot, m_viscl / m_rhol - m_viscf / m_rhof, outarrayPhi, 1,
454 outarrayVisc, 1);
455 Vmath::Sadd(physTot, m_viscf / m_rhof, outarrayVisc, 1, outarrayVisc, 1);
456 m_fields[nvel + 2]->FwdTransLocalElmt(outarrayVisc,
457 m_fields[nvel + 2]->UpdateCoeffs());
458}
459
460/**
461 * Solve pressure system via a variable-coefficient Poisson problem.
462 */
464{
468
469 // Setup coefficient for equation
470 factors[StdRegions::eFactorLambda] = 0.0;
471
472 int nvel = m_velocity.size();
473 int physTot = m_fields[nvel + 1]->GetTotPoints();
474
475 // Calculate 1/rho to use as laplacian coefficients
476 Array<OneD, NekDouble> InvRho(physTot, 0.0);
477 m_fields[nvel + 1]->BwdTrans(m_fields[nvel + 1]->GetCoeffs(),
478 m_fields[nvel + 1]->UpdatePhys());
479 Vmath::Sdiv(physTot, 1.0, m_fields[nvel + 1]->GetPhys(), 1, InvRho, 1);
480 varCoeffMap[StdRegions::eVarCoeffD00] = InvRho;
481 varCoeffMap[StdRegions::eVarCoeffD11] = InvRho;
482 if (nvel == 3)
483 {
484 varCoeffMap[StdRegions::eVarCoeffD22] = InvRho;
485 }
486
487 auto gkey = m_pressure->HelmSolve(Forcing, m_pressure->UpdateCoeffs(),
488 factors, varCoeffMap, varFactorsMap);
489 m_pressure->UnsetGlobalLinSys(gkey, true);
490
491 // Add presure to outflow bc if using convective like BCs
492 m_extrapolation->AddPressureToOutflowBCs(m_kinvis);
493}
494
495/**
496 * Solve velocity system velocity system via variable-viscosity Helmholtz
497 * problems for each directional velocity component using a mass matrix variable
498 * coefficient.
499 */
502 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
503 Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble aii_Dt)
504{
508
509 AppendSVVFactors(factors, varFactorsMap);
510 ComputeGJPNormalVelocity(inarray, varCoeffMap);
511
512 size_t nvel = m_velocity.size();
513 int physTot = m_fields[nvel + 2]->GetTotPoints();
514
515 // Calculate 1/nu to use as mass matrix coefficient
516 Array<OneD, NekDouble> InvVisc(physTot, 0.0);
517 m_fields[nvel + 2]->BwdTrans(m_fields[nvel + 2]->GetCoeffs(),
518 m_fields[nvel + 2]->UpdatePhys());
519 Vmath::Sdiv(physTot, 1.0, m_fields[nvel + 2]->GetPhys(), 1, InvVisc, 1);
520 varCoeffMap[StdRegions::eVarCoeffMass] = InvVisc;
521
522 // Solve Helmholtz system and put in Physical space
523 for (int i = 0; i < nvel; ++i)
524 {
525 // Add diffusion coefficient to GJP matrix operator (Implicit part)
527 {
529 {
531 }
532 else
533 {
534 factors[StdRegions::eFactorGJP] =
536 }
537 }
538
539 // Setup coefficients for equation
540 factors[StdRegions::eFactorLambda] = 1.0 / aii_Dt;
541 auto gkey =
542 m_fields[i]->HelmSolve(Forcing[i], m_fields[i]->UpdateCoeffs(),
543 factors, varCoeffMap, varFactorsMap);
544 m_fields[i]->UnsetGlobalLinSys(gkey, true);
545 m_fields[i]->BwdTrans(m_fields[i]->GetCoeffs(), outarray[i]);
546 }
547}
548
549} // namespace Nektar
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
ExtrapolateSharedPtr m_extrapolation
Array< OneD, int > m_velocity
int which identifies which components of m_fields contains the velocity (u,v,w);
int m_nConvectiveFields
Number of fields to be convected;.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
void AccumulateRegion(std::string, int iolevel=0)
Accumulate elapsed time for a region.
Definition Timer.cpp:70
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
Defines a forcing term to be explicitly applied.
Definition Forcing.h:72
Base class for unsteady solvers.
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
void v_SetUpPressureForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt) override
void SetUpLevelSetForcing(const Array< OneD, NekDouble > &fields, Array< OneD, NekDouble > &Forcing, const NekDouble aii_Dt)
void SolveLevelSet(const Array< OneD, NekDouble > &Forcing, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarrayPhi, Array< OneD, NekDouble > &outarrayRho, Array< OneD, NekDouble > &outarrayVisc, const NekDouble aii_Dt)
void v_SolvePressure(const Array< OneD, NekDouble > &Forcing) override
Array< OneD, Array< OneD, NekDouble > > m_SurfTen
void v_InitObject(bool DeclareField=true) override
Initialisation object for EquationSystem.
void v_GenerateSummary(SolverUtils::SummaryList &s) override
Print a summary of time stepping parameters.
void v_SolveUnsteadyStokesSystem(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt) override
void v_SetUpViscousForcing(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt) override
static std::string className
Name of class.
void v_SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt) override
VCSLevelSet(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
bool m_useGJPStabilisation
bool to identify if GJP semi-implicit is active.
void AppendSVVFactors(StdRegions::ConstFactorMap &factors, StdRegions::VarFactorsMap &varFactorsMap)
void SetUpViscousForcing(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
void SetUpPressureForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
void SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)
Array< OneD, NekDouble > m_diffCoeff
Diffusion coefficients (will be kinvis for velocities)
void v_InitObject(bool DeclareField=true) override
Initialisation object for the unsteady diffusion problem.
void SolvePressure(const Array< OneD, NekDouble > &Forcing)
bool m_useGJPNormalVel
bool to identify if GJP normal Velocity should be applied in explicit approach
void ComputeGJPNormalVelocity(const Array< OneD, const Array< OneD, NekDouble > > &inarray, StdRegions::VarCoeffMap &varcoeffs)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
MultiRegions::Direction const DirCartesianMap[]
Definition ExpList.h:95
std::vector< std::pair< std::string, std::string > > SummaryList
Definition Misc.h:46
EquationSystemFactory & GetEquationSystemFactory()
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
Definition Misc.cpp:46
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition MeshGraph.h:287
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
static VarFactorsMap NullVarFactorsMap
std::map< ConstFactorType, NekDouble > ConstFactorMap
static VarCoeffMap NullVarCoeffMap
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition Vmath.hpp:342
void Ssub(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Substract vector y = alpha - x.
Definition Vmath.hpp:250
void Svtsvtp(int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
Svtsvtp (scalar times vector plus scalar times vector):
Definition Vmath.hpp:475
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.
Definition Vmath.hpp:74
void Vabs(int n, const T *x, const int incx, T *y, const int incy)
vabs: y = |x|
Definition Vmath.hpp:354
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.
Definition Vmath.hpp:182
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition Vmath.hpp:102
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/x.
Definition Vmath.hpp:156
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.
Definition Vmath.hpp:128
void Zero(int n, T *x, const int incx)
Zero vector.
Definition Vmath.hpp:275
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
Definition Vmath.hpp:196
void Vvtvvtp(int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
vvtvvtp (vector times vector plus vector times vector):
Definition Vmath.hpp:441
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:828
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.
Definition Vmath.hpp:222
void Vpow(int n, const T *x, const int incx, const T f, T *y, const int incy)
pow y = pow(x, f)
Definition Vmath.hpp:329
STL namespace.