Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Need nearest distance between a block and a boundary #3964
Don't blocks always have boundaries? Even if they aren't explicit? You could always add extra boundaries on the fly. MOOSE has several objects for that task.
Sent from my iPhone
Can you describe what you're trying to do a bit more? Do you need the
On Sunday, September 28, 2014, lw4992 firstname.lastname@example.org wrote:
Sent from my iPhone
@friedmud, I'm working on the turbulence model of CFD using moose. This model need the nearest distance from every node of fluid to wall boundary. We can image the distance as an AuxVariable of a block. It is similar with the nearest distance between two boundaries of GeometricSearch.
I wonder if there could be a way to "fake" it.... by creating a "boundary"
Let me try real quick...
On Mon, Sep 29, 2014 at 11:44 AM, Cody Permann email@example.com
added a commit
Sep 29, 2014
Ok - this works. Take a look at #3966
I added a test that has a Mesh in it that includes a Nodeset that has every node in a block in it... then I use both NearestNodeDistanceAux and PenetrationAux to compute the distance to a boundary of that block for each node. (Note that PenetrationAux will give you a perpendicular projection to the boundary... ie the shortest distance where NearestNodeDistanceAux gives you the smallest distance to any Node on a boundary... for this simple test case these two things amount to the same thing)
There is only one downside to this approach: it doesn't work with Adaptivity. The Nodeset won't be updated when the Mesh adapts...
So... we do still need a better (more general) interface for doing this. But at least @lw4992 can get started using this method...
One more note: always remember to number your nodesets completely distinctly from your sidesets! Note that in the Mesh file my sidesets are 1 and 2 and my nodeset is 100 to make sure it doesn't collide with the sideset. This is always true with MOOSE but I just thought I would remind you here!