Hi all,
I’ve tried to read most posts of this forum regarding periodic boundary conditions and I’ve also taken a look at the code in charge of pairing periodic faces but I still have a small question:
Is it mandatory that the nodes of all periodically paired faces share the same transformation vector? i.e. the vector that joins each of these nodes with their opposites should be the same for all nodes of the periodic BC? This is not easy to impose in GMSH unless special care is taken when defining curves, loops, surfaces, etc. as GMSH may reorder the node to face connectivity, even if one uses the
Periodic
token to define the entities…
To explain it with pseudocode
def _pair_periodic_fluid_faces(self, bpart, resid):
...
lfpts = np.array([[nodepts[n] for n in fn] for fn in lfnodes])
rfpts = np.array([[nodepts[n] for n in fn] for fn in rfnodes])
lfidx = fuzzysort(lfpts.mean(axis=1).T, range(len(lfnodes)))
rfidx = fuzzysort(rfpts.mean(axis=1).T, range(len(rfnodes)))
diff = (lfpts[lfidx] - rfpts[rfidx]).reshape(-1, 3)
(diff == diff[0]).all()
Does the return value of (diff == diff[0]).all()
need to be True
?
If that is the case, I think that the code would be benefit from checking if the periodic bcs nodes are correctly matched during the import (I can take care of that). For example, if my tests are correct, the euler_vortex_2d.msh
mesh does not fulfil the periodic conformity condition (the coutte_flow_2d.msh
mesh does not show the same problem). Although, again, I don’t know if PyFR manages to deal with such issue when generating the flux points connectivity, so maybe this periodic conformity condition is not needed.
Thank you for your help,
Gonzalo