loganoz / horses3d

HORSES3D: A high-order discontinuous Galerkin solver for flow simulations and multi-physics applications
https://loganoz.github.io/horses3d/
MIT License
105 stars 23 forks source link

Velocities at no-slip walls #196

Closed TRPrasanna closed 6 months ago

TRPrasanna commented 6 months ago

Hi, I have been trying to set up cases with no-slip walls, but seem to be running into an odd issue. To test further, I chose the flat plate case that has already been set up in /Solver/test/NavierStokes/FlatPlateSA. The mesh and boundaries (apologies for some overlapping text : the spanwise length for this case is too small) for this test case look like this:

Screenshot from 2023-12-21 23-23-09

As seen above, there is a surface called NoSlipAdiabaticWall, which is set to a no-slip wall in the control file using

#define boundary NoSlipAdiabaticWall
   type = NoSlipWall
#end

To check if the no-slip boundary conditions are being applied, I set up a probe in the control file by adding these lines

#define probe 1
   name = wallprobe
   variable = u
   position = [ 1.48d0 , 0.d0 , 0.0005d0 ]
#end

to the control file FlatPlate.control. The coordinates noted above, if I am understanding this correctly, corresponds to a point on the no-slip wall. However, I get non-zero x-velocity value in the file that is created : RESULTS/FlatPlateSA.wallprobe.probe. For instance, after 100 iterations, I get the following output in the aforementioned file

 Monitor name:      wallprobe
 Selected variable: u
      x coordinate:         1.4800000000E+00
      y coordinate:         0.0000000000E+00
      z coordinate:         5.0000000000E-04

 Iteration                      Time                         u
         0    0.0000000000000000E+00    9.9999999999999989E-01
         1    9.9460826082905221E-07   -2.2668188477631304E-03
         2    1.9754134242414372E-06   -1.6636959448528322E-03
         3    2.9567903031920633E-06   -1.6276387853580640E-03
         4    3.9418642109229338E-06   -1.5894778654479153E-03
         5    4.9279753292465347E-06   -1.5491436819938882E-03
         6    5.9128066794135653E-06   -1.5107416574348198E-03
         7    6.8967458014902034E-06   -1.4733045073873057E-03
         8    7.8799657117074874E-06   -1.4369829523498718E-03
         9    8.8625135441375423E-06   -1.4017001471340325E-03
        10    9.8446149806697713E-06   -1.3674345362461638E-03
        11    1.0826337274849264E-05   -1.3341487564648570E-03
        12    1.1807700324893487E-05   -1.3018054992915622E-03
        13    1.2788778024344439E-05   -1.2703765584897056E-03
        14    1.3769661187212860E-05   -1.2398333631865612E-03
        15    1.4750425041978928E-05   -1.2101440035688633E-03
        16    1.5731116340694164E-05   -1.1812814570851256E-03
        17    1.6711767067264809E-05   -1.1532191123722916E-03
        18    1.7692409815593075E-05   -1.1259305357431905E-03
        19    1.8673080813866618E-05   -1.0993912581842454E-03
        20    1.9653815316371189E-05   -1.0735770675710900E-03
        21    2.0634639834356161E-05   -1.0484647059803933E-03
        22    2.1615570117576391E-05   -1.0240320100072106E-03
        23    2.2596615531314116E-05   -1.0002574421669873E-03
        24    2.3577783125710586E-05   -9.7712053479878051E-04
        25    2.4559078852215613E-05   -9.5460144469251460E-04
        26    2.5540507209270297E-05   -9.3268074551208367E-04
        27    2.6522070439066365E-05   -9.1134007365984934E-04
        28    2.7503767667657609E-05   -8.9056167835735802E-04
        29    2.8485594485004226E-05   -8.7032813805132186E-04
        30    2.9467543624322747E-05   -8.5062293694549546E-04
        31    3.0449606635461197E-05   -8.3143015565001629E-04
        32    3.1431775501230755E-05   -8.1273422887198675E-04
        33    3.2414043254715393E-05   -7.9452028865654024E-04
        34    3.3396403596619792E-05   -7.7677399694040016E-04
        35    3.4378850180587330E-05   -7.5948141467847700E-04
        36    3.5361376164815513E-05   -7.4262914298373268E-04
        37    3.6343974201369254E-05   -7.2620423399191259E-04
        38    3.7326636712969534E-05   -7.1019415912981245E-04
        39    3.8309356231322654E-05   -6.9458684041248881E-04
        40    3.9292125669113397E-05   -6.7937058837799910E-04
        41    4.0274938501201186E-05   -6.6453411238548280E-04
        42    4.1257788852944150E-05   -6.5006651371730549E-04
        43    4.2240671495917446E-05   -6.3595723021896481E-04
        44    4.3223581791306194E-05   -6.2219605983760275E-04
        45    4.4206515646313547E-05   -6.0877314554434107E-04
        46    4.5189469499032700E-05   -5.9567893444798848E-04
        47    4.6172440273035285E-05   -5.8290416075655485E-04
        48    4.7155425245248823E-05   -5.7043992691621637E-04
        49    4.8138421855779061E-05   -5.5827758854020608E-04
        50    4.9121427565233726E-05   -5.4640877901580213E-04
        51    5.0104439849906612E-05   -5.3482540341598644E-04
        52    5.1087456330613590E-05   -5.2351961618246786E-04
        53    5.2070474945134885E-05   -5.1248382193584165E-04
        54    5.3053494063655895E-05   -5.0171066577910203E-04
        55    5.4036512503869498E-05   -4.9119302158836468E-04
        56    5.5019529469940991E-05   -4.8092398446423617E-04
        57    5.6002544469118679E-05   -4.7089687023424160E-04
        58    5.6985557243994082E-05   -4.6110520021333827E-04
        59    5.7968567725465622E-05   -4.5154269569402678E-04
        60    5.8951575991402000E-05   -4.4220326931253663E-04
        61    5.9934582214894100E-05   -4.3308102050750908E-04
        62    6.0917586599042466E-05   -4.2417023027898959E-04
        63    6.1900589308881045E-05   -4.1546535137841991E-04
        64    6.2883590415316912E-05   -4.0696100403791335E-04
        65    6.3866589864951183E-05   -3.9865197077634953E-04
        66    6.4849587485682405E-05   -3.9053318957941741E-04
        67    6.5832583030319623E-05   -3.8259974921769918E-04
        68    6.6815576250107395E-05   -3.7484688436480737E-04
        69    6.7798566979807793E-05   -3.6726996428024331E-04
        70    6.8781555212953335E-05   -3.5986450037497420E-04
        71    6.9764541150544438E-05   -3.5262614533926551E-04
        72    7.0747525215417089E-05   -3.4555066373854516E-04
        73    7.1730508035442090E-05   -3.3863394709276209E-04
        74    7.2713490406552965E-05   -3.3187200547259979E-04
        75    7.3696473248278816E-05   -3.2526096345050998E-04
        76    7.4679457561069242E-05   -3.1879712858357440E-04
        77    7.5662444389049127E-05   -3.1247683248669043E-04
        78    7.6645434787175415E-05   -3.0629644133830575E-04
        79    7.7628429790159350E-05   -3.0025250346200829E-04
        80    7.8611430381325288E-05   -2.9434166398421374E-04
        81    7.9594437462200617E-05   -2.8856066190538292E-04
        82    8.0577451824888902E-05   -2.8290632739784015E-04
        83    8.1560474130424061E-05   -2.7737557858976194E-04
        84    8.2543504896448054E-05   -2.7196541823224760E-04
        85    8.3526544492671775E-05   -2.6667293156436490E-04
        86    8.4509593143623288E-05   -2.6149528367251223E-04
        87    8.5492650937233776E-05   -2.5642971700726061E-04
        88    8.6475717837907593E-05   -2.5147354898604889E-04
        89    8.7458793703296218E-05   -2.4662416968449847E-04
        90    8.8441878304014793E-05   -2.4187903965659842E-04
        91    8.9424971345000937E-05   -2.3723570071262765E-04
        92    9.0408072486745507E-05   -2.3269175259627213E-04
        93    9.1391181364331586E-05   -2.2824483186674346E-04
        94    9.2374297602420633E-05   -2.2389265981037480E-04
        95    9.3357420825162526E-05   -2.1963301794800520E-04
        96    9.4340550661192908E-05   -2.1546374622034790E-04
        97    9.5323686744908521E-05   -2.1138274122871442E-04
        98    9.6306828715748730E-05   -2.0738795453415217E-04
        99    9.7289976217164353E-05   -2.0347739980964367E-04
       100    9.8273128896348333E-05   -1.9964914815355847E-04

I expected the values in the third column to be zeros (since the velocities on a no-slip wall should be 0) , but I get some non-zero values as seen above. Is this expected behavior from the code? For reference, I am using the code from the last commited version on November 17, 2023.

loganoz commented 6 months ago

Hi @TRPrasanna,

The spatial discretisation used in HORSES3D is discontinuous Galerkin spectral element method (DGSEM). In this formulation, we have a piecewise polynomial solution, with discontinuities at element boundaries. The no slip boundary condition is weakly imposed through the fluxes, which means that the solution is not required to be exactly 0 at the boundary condition. This small velocity that you find should be reduced by increasing the resolution (finer mesh or higher polynomial order).

I hope this answers your question.

TRPrasanna commented 6 months ago

Thank you for the clarification, Prof. Rubio.