Initial Meshing for CFD

Transcript

Hey everyone, Maiki Vlahinos here. Going to talk about some pretty major updates to how we export our mesh files for analysis, primarily focusing on Fluent, Ansys Fluent, and Ansys Discovery. But we’ll also now start to get into Star CCM.

Before we hop into all of that, the original heat exchange course was created in June of last year, and that used nTop version I think 3.24. We have since launched 4.0, and this recording is using nTop 4.9. So real quick, we’ll just add some comments here for those two sections. We’ll leave them and add on to that. You’ll also notice we have a couple deprecated blocks since then as well. We’ll leave most of them needing updated and just go and update the final fluid domains here.

Then I’ll click manual run mode on this and cancel the meshing. As we build out the meshes together, and I show you how to do them, I’ll also call out new and improved shortcuts or usability enhancements, that type of thing as well. The first hotkey that you might not be familiar with is wherever your cursor bar is, or this blue insert. If you select “S” on the keyboard, that will toggle this window. I have three options in this case: I can add a block; it’s similar to the search function up top; we can add a section or add a comment. So I’m going to come below this block here. I’ll click “S.” I only have two options because there’s no block to add a comment to. I’ll add a section and I’ll call this “Meshing September 2023 4.9.”

If you’ve followed a lot of my meshing best practicing videos, this initial part might be a little redundant, but there also might be some new information for you as well. I’ll click “S” again, and the first block we’re going to call is the Mesh from Implicit Body block. As it comes in, this is its default setting. You’ll notice that there are only three main input options. If I Control-C, Control-V the block, it’ll copy and paste a new one, and I’m going to relabel this comment to “Overload.” I can click the down arrow and access the overload option.

All this is going to do is expose a handful of new inputs. Virtually anytime I use this block, especially if I want to select edges to preserve their sharpness on, I’ll access the overload. The main reason being, and I’ll show you a time comparison between the two, is in most cases, at least let’s talk about the CFD, we really only care about preserving the edges in this case at the inlet and outlet boundaries. We don’t have to preserve the sharp edges within the TPMS structure itself. First, it’s inherently curved, so it’s going to be difficult for the algorithm to preserve those edges without causing self-intersections or some other mesh quality issues, but it also takes more time.

So the first thing we’ll do is set up both of these mesh blocks and go ahead and click compute. So we’ll drag the final cold fluid into both of them. I’ll hold the Control key to drag and drop. That’s going to keep that there. All I’ll right-click, make the tolerance a variable, and I’ll call it “Fluid Tolerance.” Sharpen extents or iterations, I’ll put on one. So if you are unaware, if I click sharpen here, it’s going to kind of, like I said, sharpen everywhere, and the default number of iterations in this block is going to be one. So we’ll click off sharpen, leave the iterations at one, and we’ll use the same set of preservation regions that we previously built out. And all this is, is a custom block that will take in the CAD faces that we previously extracted in the hex course. It thickens them into implicit bodies. And so what we’re going to do now is tell the mesh block, wherever this purple disc intersects with the object we want to mesh, that’s where I want you to focus in on preserving the edges. Everywhere else, you can round as needed.

So we’ll drag the preservation regions down into the sharpen extents input. Zoom back out, and you’ll notice that we have four preservation regions, one for each inlet and outlet of the fluid domains. So now go ahead and input a tolerance value here. We’ll start just with one millimeter. I’ll open up the log window at the bottom. So in this case, the first block, the overloaded option, took 10,000 milliseconds, and the other one took 12,000. So percentage-wise, quite a large difference. We can look at the quality of the mesh, and we’ll likely see that we need to refine the tolerance. We have not captured the geometric fidelity that we want. We can turn on the cold fluid and see we have quite a few negative and positive interference zones between the two. So I’ll reduce this element count, let’s say to 0.55. And all this tolerance is, is an allowable surface deviation between the incoming implicit and the output mesh file. I’m also going to turn my resolution on to highest as well.

So we can see that with a tolerance of 0.5 millimeters, we capture the geometric fidelity quite a bit more, and the overloaded block, because we have sharpening defined, took 88 milliseconds, and when we’re not sharpening anything, we’re at 63. If I click sharpen now, and let’s recompute. When we choose to sharpen everything in this case, it took 1,000 milliseconds to run versus the 88,000 if we choose just to sharpen the regions where we in this case want to apply our boundary conditions. Now there are some fringe cases where we might want to preserve edges of these curved surfaces, such as if we need to define symmetry planes and other types of boundary conditions that require that sharp edge or feature. But for the most part, defining extents or regions where we want to actually preserve these edges has a pretty large impact on your overall workflow.

With that, we’ll close the log window and get into the next step, which is going to be reducing the element count. So we’ll delete the default version of the block and turn on just the mesh. One thing you might notice, the rendering of the mesh looks a lot different than it did previously. For instance, if I pull open the course from about a year and a half ago, you’ll notice that the mesh on screen with a tolerance of one, so twice as coarse as we’re looking at now, looks pretty black, and we’re not able to see much of the features. Our development team put a lot of effort into trying to improve the mesh visualization so as we zoom in, we’ll see the elements show up, and as we zoom out, they’re still there, but the rendering is handled a bit differently.

So we can click the properties and see that we have 5.6 million faces. Ultimately, that’s not something we can manageably deal with in most downstream applications, so we need to figure out ways to reduce that element count. We’ll call this initial cold mesh, and just so I don’t get confused, I’m going to call this one bold and same with this hot mesh. In previous videos, we’ve gone through, and in my surface meshing best practices, we’ve gone through different techniques over the handful of months and years with regards to how to approach meshing. So for instance, you’ll see that I’ve gone through several iterations with this. The last major update was earlier this year in January.


I’m not going to go into detail in this mesh input suggestions document, but we’ll talk about some of the major aspects in this hex course. So what we’re going to do is we’re going to take this mesh from Implicit Body block. We can click this plus sign and we’re going to go straight to the Remesh Surface. We’re going to skip the Simplify Mesh by Threshold for now.

We’ll actually notice that I just recently updated to nTop 4.9. There is a new settings tab under units that allows me to update my unit preferences. So we’ll go ahead and do this real quick. I’ll say degrees here, watts per meter squared, watts per meter Kelvin, joules per kilogram mass and kilograms. Say okay, and we’ll see that we’re updated to degrees here from radians.

Using the Remesh Surface block, the two main inputs I want to call out are the mid-edge length and the cord height. In both of these cases, we’re going to use a fraction of this fluid tolerance input. That’s why I created it as a variable to determine what values these are going to be. The cord height, we’re going to add in a Multiply block here. We’ll drag the fluid tolerance in and I generally sit around 2%. I can go into detail in that measure’s best practices as to why that is.

The mint edge length, you’ll notice, is zero. So if we were to compute this block, the Remesh Surface is going to, based on the inputs, say, “Okay, I can go. My element size can go as small as zero,” but that doesn’t really make sense, right? Because we’ve already discretized our part. So we’re going to change this value from a default of zero. We’ll call a Multiply block again, and what I found to work is as a good first pass is about 33% of that initial tolerance value. In an earlier study, I did, the impact of the mint edge length with the overall computation time of this block is significant. With the mint edge length at zero in the first case study I looked at, it took about 75 minutes for the block to run, and when I defined a mint edge length, it was down to less than five minutes. So a substantial decrease in solve time.

We’ll set growth rate to industry standard about 1.2 triangular elements. And with these inputs, the block is now going to, we can let the block work for us, so I don’t need to have a tight or small edge length defined here in order to get a good quality mesh. So I’m just going to mesh, so I’m going to set this up to 15, and we’ll let this compute. And while it does, I’ll go ahead and set up the same process for the hot fluid domain as well. Remesh.

So the cold took 400,000 milliseconds, and we actually got an error on the hot, which will be good because we can go ahead and debug that together. But overall, we’ve maintained the fidelity of the part and have a pretty high quality mesh to move forward with. So let’s look at the hot side for now.

So in the process of setting this up, I remembered that there were two parts to the hot fluid: the main domain and the extra bit at the bottom. So we use the Mesh Implicit Body, put that into Split Mesh, and we’ll isolate the two domains. And in this case, we’re going to mesh just the main hot fluid. So the Mesh from Implicit Body went through. I’m just going to more or less do a quick visual on the outside, see if anything stands out to me as being an issue, and then we’ll do a cross-sectional view. I’m mostly just looking for small bits that might cause mesh failures in the Remesh Surface. Shouldn’t be any issues in the actual core itself. So we’ll speed through this.

Okay, so a handful of segments that are likely causing these issues. This little bit here, and probably for sure, these sections. So what we can do with this then is we’ll incorporate a Mint Feature Size. And all this is going to do is tell the mesh block to ignore any implicit parts that are below this value. So I’ll just put in 0.25, see what happens. I’m going to click manual run mode on the Split Mesh so we don’t start the other processes. Okay, and so we removed that little connector piece. Now these are still somewhat unwanted, but they won’t or shouldn’t really disrupt the mesh. And we might have even had some bits that were connecting on this backside. So we can go to the hot fluid. We’ll turn this on real quick.

While this is rendering, you might also notice the section cut window has been modified. So rather than manually inserting zeros, ones, or other values to get a cross-sectional plane, we now have the plane buttons. And you can, I’ll show you here in a second, you can double click one to flip the direction that you’re viewing. So if I click this XY again, it would flip to the opposite side. But yeah, indeed here, if we do a high-res render, so click the object, Control H, we’ll see that we also have some pretty thin sections that we’re likely getting meshed and causing issues here as well. So by putting in this Min Feature Size, we’re basically telling the block ignore anything below 0.25 millimeters of, in this case, thickness. We’ll click play again on the Split Mesh here. Remove the manual run mode. And while this is getting set up and running, I will set up the mesh for the solid domain and then talk to you through that once it’s completed.

So the solid Mesh from Implicit Body finished. I have a pretty tight tolerance, 0.025 millimeters. And again, for the most part, we just want to make sure we’re capturing the fidelity of the geometry. So we can turn this on. And you’ll also notice that I’m only meshing the hex core rather than the shell and everything associated with it. There’s no real reason, at least in these initial stages when we’re going to do the conjugate heat transfer analysis, to have to mesh the entire solid domain. That’s just wasted elements and wasted computation time where we really just care about what’s happening between the two fluid domains. There might be a few thin sections that we have to resolve in the mesh to help clean that up. So again, we can do a Control H. And it’s also important to remember that in the final design, all of these edges here are going to be, there’s going to be a blend radius between the lattice and the shell core. So what we’re seeing here and having to potentially deal with won’t be an issue in the final design. So we can look at that mesh. We do indeed actually have some potential issues. So we’ll do the same thing. We’ll introduce them in Feature Size, and I’ll just say 0.01 millimeters. Let that run. We still have some of those satellites, but otherwise, I think we can move forward. We’ll see what happens in the remesh. Click play. And once both of these finish, we’ll see how they end up looking. But you’ll notice that I followed the same exact protocols for the solid as I did for the fluid. I have the Multiply blocks in the mid-edge length and cord height associated with the solid tolerance in the Mesh from Implicit Body, and again, with 33% and 2% of those of that value.

Remesh of the hot finished successful that time, so it was those small connectors or overlaps that caused the mesh to fail.


Then once this finishes, the last thing we’ll quickly look at is the simplify mesh by threshold and how that impacts the solve time. So I’m going to enable manual run mode onto this, do the initial cold mesh, and this threshold input is akin to or the same as cord height in the Remesh Surface block. So in other words, the allowable surface deviation the mesh can take while it’s trying to remesh. So I’m going to use the same 2% tolerance, but I’ll wait for the remesh of the solid here to finish. In the meantime, I’m going to go through and make these variables.

Well, if the solid continues to mesh, we’ll start to touch on the mesh export and generating the msh files. I’ll click S to add a new section, call this Mesh Exports, and it’ll be the same thing. I’m just going to copy up here. First block is going to be FE Surface Mesh. We’re going to turn each of these final remeshed blocks into an FE mesh. So we’ll do the cold fluid first, because we’re moving to CFD and we’re going to remesh there. There’s no reason to do a quadratic element order or mid-side nodes as it’s called in some instances. Make this a variable and call this final cold mesh.

In previous videos and tutorials that you might have seen up until this point to get to Ansys Discovery, we exported generally an STL mesh and then in Discovery we would use the faceted selection tool to snap to let’s say the edge that we define here to create our inlet and outlet boundary conditions. With some updates on Ansys’ end, as well as ours, we can now export an msh file and those boundary condition locations are going to come along with that block. So we’ll start kind of from the top and work our way back. So we’re going to export an FE Mesh to CFD. And you’ll notice that there are a handful of inputs: file path, the location we want to store the mesh, and then boundaries, and a new one is the wall name. I’ll get back to the wall name and we’re going to start with the boundary. So I’ll double click. We’re going to create a CFD boundary list and I’ll click the plus sign a few times to add to that. First one we’re going to do is going to be CFD Boundary on FE Mesh. So we’ll double click again and we’ll select this. The other options there that you saw, the cold inlet, the cold outlet, and the cold solid interface are from the old exports option, so we’ll ignore those inputs.

So for the CFD boundary on FE mesh, in this case with the FE mesh isolated, we can use the Mesh by Flood Fill option. So I’ll right click here at this location FE Boundary by Flood Fill. And depending on how well this edge is captured, if there are small deviations in elements, especially the angle like you saw, you might capture more of the geometry than you want. So generally, I’ll come back to this angle value and drop it down to about 30, and that just forces that block to only capture these elements. We’ll drag the FE boundary into this block, we’ll select mass flow inlet, and this is a pretty new and big feature especially when it comes to automation, is we can now choose the named selection. Previously, when we would import the msh file, it would get brought in as a default naming convention. So in this case, it would have been called face set one, but in this case, I’m going to call it cold_Inlet.

I’m going to do the same thing for the cold outlet. So I’m going to isolate the msh file again, come back to here. We’ll right click FE Boundary by Flood Fill. You can see that time with 45 it captured it, but because I intend to do some form of nTop and continue to come back to this, I’m actually going to drop that value down to 30. We’ll add in a new FE CFD Boundary on FE Mesh. This one’s going to be pressure outlet and I’m going to call this cold_Outlet. If you start to type out these names and you put in special characters, you’ll get a warning that tells you special characters aren’t allowed. And the other warning you’ll get is if you have a space and you try to output the name selections, it’s going to automatically put in an underscore for you. So I go ahead and just do it anyway.

Then the last bit we’ll want to capture is the interface between the solid and the cold fluid here. For this instance, we can’t really use the FE Mesh by Flood Fill. So if I show you what that looks like, what’s going to happen is we’re going to capture, as you would expect, basically this entire structure, where we really only care about the interface region between the two. So within this CFD Boundary on FE Mesh block, we’ll double click and I’m going to select FE Boundary by Body. The mesh I want to select elements from is going to be my final cold mesh. I want faces and the body I’m going to use to select is going to be my hexacore.

So you’ll notice that we’ve captured very few of the actual elements that we want to transfer heat from. The reason being is this default tolerance comes in very small at 0.01 mm. So sometimes it’s going to be a little bit of a guess and check, but because we did this previously on this example, oops, if we scroll down, we can see, okay, we used 0.065. So I’ll copy that, put that value into here, and we should see that we’ve captured more of the elements that we want to transfer heat across from. While that’s going, we’ll label this as interface, and this is going to be cold_to_solid for the name. All of the remaining elements that don’t have a named selection, so in other words, the cold inlet, the cold outlet, and our interface region here, all have something associated with them. It’ll get labeled as default. If you don’t define a wall name, however, if we get into importing multiple bodies into Fluent, it’s extremely beneficial to at least have the word cold in here. So generally, I’ll just come in and say cold default. So that way you’ll see in Fluent when we get there, we’re going to have four different boundaries: the cold inlet, the cold outlet, the cold to solid, and cold default name selections.

With that set up, we’ll get into defining the file path. The location we’re going to store them in is this final data mesh files. And we’re going to automate this process a little bit. So I’m going to double click on here. I’m going to add in Concatenate Text. This first text variable is going to be my file path. I’m going to add another Concatenate Text, and this second text option is going to be my extension. I’m going to put, I’ll use this Deliminator option here. We’re going to export an msh file and the file path is this. And I’m just going to call this test file. So hopefully here in a second, we should see a test file with an msh file extension getting outputted. Oh, actually, what we need to do is we need to come and add a forward slash here.

We can open up the msh file, and at the bottom, you’ll notice that we have our zone call outs: the cold default, the cold solid, the cold outlet, and the cold inlet. Now calling it just test file doesn’t really tell us a lot. So we’ll delete this and enable manual run mode and start to build this out.

I’m going to add one extra, at least here, Concatenate Text block, and I’m going to call this cold fluid. And we’ll actually do one more Concatenate Text, and we’re going to call this Z cell size. And what we’re going to do now is we can call in a text from a Scalar block cell size in the Z because maybe we want to look at aspect ratio. Let’s see why that didn’t work. Ah, okay, so we’re going to actually grab this value. It’s in millimeters, and we only need a couple significant digits. So C cell size, it’s going to capture that value. And so the output file looks like that.

Let’s add some delimiters just to kind of split this apart a little bit. We’ll add a hyphen here and a hyphen there. Click play. So cold fluid Z cell size 10 mm. We’ll delete that one. So now anytime we come into this file, and let’s say again, we want to look at aspect ratio. If we change this cell size, it’s going to update that output for us. There are multiple ways you can assign these types of parameters to help your naming scheme for files. So I’m going to go through real quick and set this up for the hot fluid and touch back on some other aspects once that’s completed.

Let’s talk a little bit about the automation side of things. So you’ll notice that, or you might have noticed, when we used the Filter Mesh by Flood Fill option, so if we right-click here at the inlet for the hot fluid, there’s an origin point. That origin point is originally defined from where your mouse is, and then it’s going to snap to that closest element, and then from there select all of the values or all the elements that it needs to, based on the angle criteria. That’s a very robust way in setting up the automation. So what we can do instead is use our incoming CAD data as this point of origin. So we’ll use this Filter Mesh by Flood Fill block, and rather than having this origin be random, let’s call on the oil inlet face. So this is that CAD face we originally extracted. We’ll go to the bounding box, grab the centroid of it, and so now this Flood Fill option is tied to that face. We’ll drop this down to 30°. I’m going to Ctrl-C, Ctrl-V, and we’ll do the same thing with the oil outlet face bounding box centroid.

Ah, okay. So now the reason this one didn’t work is the direction that it was snapping to. So there are a couple of ways we can go about fixing this. If it’s a repeated error, we can, I have a custom block that defines a vector through a CAD cylinder or a hole, and you can always define that direction. Or in this case, what we should be able to do is just reverse that value because we’re in the Z-axis. And so you just need to change the normal direction that the Filter by Flood Fill is going to look at. So just to keep it as robust as possible, and so you have access to this custom block, I’ll set it up as is. And another nice new feature is you can now right-click on custom blocks and say open block. See how it’s built and, or at the same time, update blocks if they need updating.

Okay, so all I did is I went back into the CAD bodies, and under my CAD and implicit references section, I extracted some more CAD variables and added these four custom blocks. Going back down to our Export CFD section, this is our hot fluid. So this is going to be oil inlet vector. And we got an error. It’s likely because it snapped to the wrong direction. So it’s just facing the wrong way. So I can come to this input. If I push the period button or dot on my keyboard, it opens up the properties. I can come to the negative, so we’ll flip the orientation of that, and we’ve captured the oil inlet. We’ll do the same thing for the oil out vector. We’ll do this, oops, scroll back down. We’ll do the same thing, negative. We’ve captured that. Go ahead and insert these into the Export block. And then we’ll set up the same thing for the cold. So we’ll come to here, and we’ll say, I think it was fuel inlet face bounding box centroid, and we’ll go fuel outlet face bounding box centroid. And then do the same thing, inlet vector, do negative. And then this will be out V fuel outlet vector. Just going to assume negative. And so there we go.

Whoa, let’s see why this one didn’t work. Let’s drop this to 15. Final cold mesh fuel inlet face centroid fuel inlet face fuel outlet up to 30. See if I’m seeding from the wrong place. Okay, that point looks fine. Fuel inlet vector. Strange. Last thing I want to check, make sure we got the right edges. Fuel inlet, fuel inlet face. The outlet works fine. How weird. Fuel inlet face. A vector through those custom blocks and change. It’s almost like the seed point is off. Going to spend a little bit of time trying to debug this, then hopefully get back to the course here in a second.

Okay, so what I ended up finding out was indeed it is the origin point. So if I take, so this is the mesh, the boundary by flood fill as we had it set up. What I did was do another Filter Mesh by Flood Fill. I took that original origin point that came from it. So that’s this block here. And if I insert that into this block, we capture the inlet phase. If we look at where that fuel inlet face point is, it sits just barely within the domain. It looks like so that could be a bug. I’m going to approach it as is, but for now, what I ended up doing was translating the position of that point. So I called on a Translate Object block. We want to translate this point, and I translated it along the fuel inlet vector that we’re using to define that snap range. And I just added a very small number to that. So our new point sits outside of that body. So we’ll drag that into here. Now we capture that face. A little bit convoluted, but at least we figured it out. So I’m going to clean up the notebook a little bit. Minimize that. And then let’s check the cold or the Export Hot Fluid block. So in this case, we want to look at the file path. This is going to get changed to hot fluid instead. Z cell size is fine. And then I want to make sure and double check hot inlet, hot out hit, hot solid, and hot hot default. So now click play.


Let’s see. CF boundaries must be applied to the F mesh.

Ah, so the last thing is we’re accidentally exporting the cold mesh here, so we’ll replace that with the hot. Should be good to go. The mesh. So two MSH files, both with the named selections that we want. I’m going to set up the same exact process for the solid remesh. While I’m doing that, I’m also going to click play on the Simplify Mesh by Threshold for the initial cold. We’ll see how long it takes and the mesh quality of that block as well.

Okay, so the Simplify Mesh by Threshold finished. It did produce self-intersections in this case. You’ll see that for the most part, we turn on the cold fluid. We’ve lost some geometric fidelity compared to the remesh surface and the mesh implicit body, but the overall element count has come down substantially. So the initial cold mesh was 5.6 million, the remesh of that was 1.7, and the Simplify Mesh by Threshold was 1.2. Compared to the remesh surface block that was 86,000 milliseconds versus, I think it was, 400,000 or so milliseconds for the remesh surface. So pretty large time difference. If you’re able to get clean quality meshes out of them, or if your downstream tools are okay with some self-intersections, then depending on what you’re trying to accomplish, this mesh could be satisfactory. If we’re simply going to slicing, it might be okay. I have experienced some issues trying to remesh these types of meshes primarily just because the elements have poor orthogonality and skewness, and it also kind of then impacts the seed elements and sizes and faces during remesh stages. For the most part, I tend to stay in the remesh surface realm, but do know this is still a good option.

So while this Boundary by Body block is building out, I want to talk about a couple potential issues that I’ve had in running CHT. So I’m going to turn on the hot and cold fluids as well as the hexacore. As it stands right now, when we mesh these and as built, it’s essentially line to line or coincident faces. What that means is when I come to generate my interface regions, there’s going to be some overlap between the two objects, between the two meshes. When we pull these into Ansys, it sometimes gets a little bit confused on what boundary zone is associated with what object. The main way that I get around that is by using the Clearance block. So under modeling, we have a handful of blocking operations. Clearance is one of them, and I’ll show you what this does. We’re actually going to end up using this block.

So I’m going to take my final cold fluid as my primary body and my hex core is going to be my subtraction body, and I’m going to do the same thing for the final hot fluid. I’m going to add a new variable that’s clearance distance, and I’m going to put in a pretty small value. Let’s just say 0.05 oops, mm. So all this is going to do is based on the proximity from the hex core to the cold fluid, it’s going to do a Boolean subtract operation. The final cold fluid isn’t a good visualization for this just because you can see how much the fillets and the walls have removed from here. So a better representation would be this hot fluid actually, but we can see a difference between these two. Turn on the XX core. So this gray object is our new Clearance block. And so there’s a 0.05 mm gap between the wall there. And if we turn on the final cold fluid so we can high res control H, you effectively have line to line with those two. Because our faceted representation of the body is just that, it’s faceted, there will be instances where triangles from our hot side or from our fluid side, and this is a bit of an exaggeration, overlap with triangles from the solid. So if we can put this buffer into our analysis or into the machine, it tends to be a bit more robust. Since that finished recalculating, we can look at that interference. So I’m going to color this guy green and this is the cold fluid, so we can turn the cold to solid on and I’m going to color this red. So we can see there is a bit of overlap between the two segments, and if we put this buffer, that overlap tends to behave a bit better in our CAE tools. So Clearance block for the hot and Clearance block for the cold.

Let this run. I’m going to pause the video and then come back when it’s finished. Okay, both meshes finished. We’ll see what the interface regions look like. So this is the cold to solid. Change the color so it’s blue instead. And I’ll increase this value a little bit and I’ll do the same probably with this one, so we can see we have far less interference between the two.



Now, one thing I’m not a huge fan of on this interface are the floating bits. Let’s see if we can resolve why that’s happening. Final cold fluid is our Selection Body, and that’s probably the culprit. So, we’ll turn on the mesh, look at the final cold fluid, and we’ll actually see that we’re capturing beyond that as well. So, our selection criteria is pretty large. Let’s try doing the cold fluid instead. Let’s see what this looks like.

So, there’s likely what’s happening if we turn on the final cold fluid and look at the Field Viewer, there are some residual artifacts of, let’s shrink the field down to 100. There are some residual artifacts that are causing that. So, if we look at just this, we still have them. I’m going to take this offline to debug and come back.

I found the main issue and a resolution for it. So, real quick again, what was happening is we were using the final cold fluid, this blue implicit, to try and select the facets on the hex core mesh to define an interface. And we noticed that we were also selecting the surface on the hot side as well as the, we’ll call it, perimeter region of the heat exchanger core. If we look at just the Field View of this final cold fluid and change the range from -0.1 to 0.1, and then decrease the size of the field plane again, we’ll notice that we have these artifacts showing up. They stem from the original creation of the cold fluids.

I’m going to switch to a different window. This is where I have the resolution. So, this is the old cold fluid. Turn these off and we’ll look at the field. And the reason we changed the size here is there’s a certain number of pixels that are going to be displayed on the Field Viewer, and so the smaller it is, the more resolution we’ll have. And then a good way to debug if you have to look for any type of field issues like we saw here is to set the Min and Max values pretty small so that way the color band is very narrow and pronounced.

So, looking at the field of the again, the original, we’ll call this cold fluid, we see that those artifacts happen. The reason they’re happening is how we ultimately created this implicit body. So, we’re taking our design space, which is just a cylinder, and we’re subtracting out the hot fluid as well as the hex core. What causes these artifacts is what’s known as geometric singularities or coincident faces. They occur in other softwares where if you have line-to-line contact or planar contact, sometimes it’s unable to resolve the difference between the two. So that’s what is ultimately causing these artifacts and singularities. If we turn on just the hot fluid, we’ll see we have the shape of those artifacts as well as the perimeter from the design space itself.

I noticed, however, that if I looked at the field of the hot fluid and we set the same range 100, that those artifacts don’t persist. So, in other words, the fluid domain that stems from this periodic lattice gives us a clean field. A workaround until we’re hopefully able to implement this as a product solution is to take simply the negative value of the periodic lattice body. So, we can click on the Properties panel under properties, conversions for the implicit body, and under scalar field, we can get the negative. All the negative it is, is the opposite side or values of the original field. So, if I pull this into here and we look at the field of the periodic lattice, we have positive values where we are defining negative values where we’re defining our implicit, and the of that is essentially just going to multiply this entire field by -1 and give us the exact opposite. So, we can now use this one block to stem both of our fluid domains.

So, we did it. We all do it the same way. We create a Boolean Intersect of the negative with our design space. So this now we’ll call Raw Cold Fluid, and then we’ll do a Boolean Subtract of this Raw Cold Fluid with the hex core to give us our updated geometry. And if we look at this field, we’ll see that those artifacts disappear. So, right now, this is fundamentally more or less changing how we’re going to design these structures. I think the reason this hasn’t really cropped up as much in the past is now that we’re at the stage of automation with Discovery and fluent, it hasn’t really been an issue because we were able to tailor the meshes a bit more.

Now, these artifacts will persist throughout the model depending on how you do different operations. So, what we can do now is if we look at this final cold fluid, we’ll see that we have some of those artifacts still show up from the Boolean Subtract of the final part. So, what we’ll ultimately use to select our boundary condition faces is this cold fluid domain. So, we’ll get to that here. I’m going to isolate just the solid mesh, minimize that, and turn this guy on. So, the green now is the interface between the solid object and the cold, and then the purple is the interface between the hot, or between the solid and the hot.

You’ll notice, however, I have one extra block in here, and that’s the clearance block. If we, and I’ll go ahead and do this now, we’re going to hit S and add a new Boundary by Body block. We’ll select faces. 0.1 hot fluid. So, while this calculates, we’ll talk about the clearance block. With this clearance block, I took the hot and cold fluids, these original ones that we created up top. I took a shell of my design space going outward. So, when this finishes rendering, we’ll see what that looks like. So, I just shelled out my design space outward, and I’m going to do one large clearance, or Boolean Subtract essentially, from this face inward by 0.1 mm. And I’ll show you why we do that here in a second, but we’re effectively just going to shrink that volume, the hot and cold fluid domains.

So, by shrinking this domain, ultimately what we’re doing, we’re just preventing the elements on this outer boundary or on the perimeter to get selected. So, if we look at it with just the hot fluid, we’ll turn this on. We can see that we’re capturing the outer elements, which can cause problems in downstream processes because we’re not actually exchanging heat between those contact points. And if we happen to share elements with the opposite interface region, Ansys can sometimes get confused with that as well, and we actually won’t even let you export an FE model like that. So, a little bit of a nuanced step right here, but pretty simple and straightforward once you understand it and implement it a couple times.

So, we’ll go ahead and remove these F Boundary by Bodies, put in our new one. So, solid to cold, solid to hot, file path, that’s all set up to go. We’ll make this a variable and click play on exporting the cold and hot fluid domains as well. All three mesh files are created. So, go ahead and start with Discovery, run an analysis or two, and then bring these into Ansys Fluent.

This lesson shows how to prepare your heat exchanger for CFD outside of nTop. For more information on meshing, we recommend reviewing the Guide to Meshing course.  

For a faster or slower speed for the video, click on the settings in the bottom right of the video.