CFD Setup 2D Solidworks

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'm going to show you how to set up solidworks flow simulation and we're going to run a simple 2d external flow case i've got a new part open here i'm going to first set my units if you don't have this tab showing up that says flow simulation what you need to do is go up next to the gear to this little drop down menu add-ins and look for solidworks add-ins flow simulation and make sure that both this left and right check mark are selected and then the tab will show up for you so let's go ahead and draw a simple airfoil just to show you how easy it is to set up flow simulation and how quickly we can get a job running draw generic airfoil it's not any particular type of airfoil it's just a streamlined body okay there's our airfoil now what we need to do is extrude and i'm going to use the mid plane what that'll do is make it easier later to to set up the computational domain i'll show you what i mean by that okay there's the body i'm gonna solve the the flow around now once the body is complete make sure you save it and now check the flow simulation tab and go to the wizard this really makes it easy to set up cfd jobs project name we'll just call it 2d airfoil leave everything else as is click next like to use foot-pound seconds go down here under mass and correct this i'm an abomination of a pound mass unit to slugs go to geometric characteristics and by default angles are shown in radians i'm sure you'd like those to measure in degrees once that's done move on we're going to be solving an external flow problem the body is solid so we don't have to worry about any closed cavities a lot of different features you could select here different types of flow problems even unsteady flow buoyancy problems rotation so forth we'll look at those in later videos just click next now gotta tell solidworks what gas you're using or what fluid you're using so we're gonna use air we're gonna allow it to calculate laminar and turbulent this is we're going to do a low mach number test case so we don't have to select this adiabatic wall we won't worry about roughness now and here's you how you can set up your initial flow parameters we're going to solve for using velocity defined by like to use aerodynamic angles look down here in the lower left hand corner you see how your coordinate system is set up it depends on what what plane you draw you you drew your body on so in this case i'm going to want the flow to be in the x-axis and let's just say it's going to be a hundred feet per second the longitudinal plane is x y that's correct the longitudinal axis is x and we'll allow the angle of attack and side slip to be zero in this case turbulent parameters will leave as default for now and that's it we've now have a job set up it's not ready to run yet because there are some things we need to change you notice this is the computational domain that solidworks set up for this job it's a pretty poor domain because what you're going to be saying is that this boundary is infinity and it's not influenced by the body obviously that's that's wrong so we're going to have to change that so come over here to computational domain and right click you can also do some of these through the icons up here i've just gotten used to right clicking on these to the left in order so that's the way i'll do it edit definition we're going to run a 2d simulation so we'll click on that first you notice it changes the computational domain this is it's still not good enough but one thing you'll notice is that in the z directions let me let me rotate it see how thin it is in the z direction it's applied what's called symmetry boundary conditions on both sides of the domain so this is simulating an infinite um an infinite width for the flow domain but it only has to solve it one element wide so it makes it very computationally efficient you'll notice here this is the width of the domain and you just have to make sure that it's on the body of interest that's why i set up the the drawing as a mid plane drawing but this is the width of the computational domain and all you'd have to do is make sure it's narrower than the body of interest okay now what we want to do is make sure that these different these walls here are far enough away from the body like to make sure as a rule of thumb for example that this forward location is about three body lengths away downstream i'll make it six and then three above and three below and this is about the minimum size we'd want to go once again what you're assuming is that the flow at the boundary is not affected by the airfoil these boundaries are infinity so it's not really possible to make a boundary that's too large it's just more computationally expensive but it will affect your solution if you make it too small but this is good enough for our purposes you click out of it and there's your computational domain and you can hide it if you want you can put it back on if you right click on input data here you can select show ambient velocity you notice i can zoom in here and this blue arrow shows what direction the flow is going that way you can check if you've got it set up going the right direction so that looks good and the next thing you don't need to change the fluid sub domains you usually don't use those for external flow type problems boundary conditions once again usually you typically don't use those for external flow problems although if you are doing let's say a propulsion problem where you want to model a jet or something like that in a domain those are nice to have but in a general external flow case usually we don't have to deal with the boundary conditions goals are important the goals in cfd oftentimes we call these the unknowns these are the things that you actually want to output so i'm going to right click on this and insert global goals and you'll notice there all sorts of different goals that you can have it track typically what i do is have it track the forces so the x force and the y force i don't need the z force because that's in the out of plane dimension and i also would like to track the z torque that'd be all the information i'd need for that airfoil click out of it and you'll notice it'll put the global go goals on here you can also use these for convergence and i'll show you that later next thing to do is go down the list and modify your global mesh so right click on global mesh edit definition you'll notice here if you just show show basic mesh this is the starting mesh that solidworks has has set up for us and it's not a bad starting mesh my rule of thumb is that if i zoom in on the body at the very least the absolute very least i'd like to have a starting at least 10 number of elements along say the the cord of the airfoil this has many more than that so this is not a bad starting mesh um i'm actually going to start it coarser just so you can see it refined faster so this little slider right here you'll notice it affects the starting mesh by quite a bit i'm going to go all the way down to one make the starting mesh pretty coarse you might never use uniform mesh advanced channel refinement if you've got a complicated body sometimes that's useful but we're not going to need that right now this ratio factor is useful sometimes you're getting into relatively complicated bodies where you really need a lot of elements concentrated near the body what this does is is sort of stretch the mesh towards the body so let's say if i make this two you notice what it did it keeps the same number of elements but it squeezes them down makes them tighter near the body and larger out here near the edge of the domain but this starting meshes is fine and i can turn off that basic mesh so i don't want to look at that anymore i can click that i can hide the computational domain and so i'm just about ready just to start this job there's just one more thing i need to do i need to set up the calculation control options i can either do that by this icon up here or i can right click on the input data like i've been doing with the other ones go to calculation control options here this tells the flow solver how it should run the job what it should be looking for when it should stop so on these are the finished criteria conditions or the criteria to stop you know the this will tell the flow solver when you think it's done usually i set it up for all criteria satisfied in other words every criteria i set up goals convergence all goals yeah in this case i'd like all three of these global goals to be converged before it stops you can also add iteration or travels calculation time all sorts of different things you can use now one thing you're going to need to do first before finishing with this page you actually need to go to the refinement tab this tells you how many times the domain is going to be refined by default it's disabled so let's turn this on let's let's set it to five what that means is that any individual fluid element can be subdivided up to five times so it can give you much tighter elements um in in regions of flow gradients so you'll notice that as the flow as the flow solves it changes its mesh and the mesh actually starts to look like the solution i'm going to say it can be we can do this five times the approximate maximum cells this is the largest number of cells that you can that the flow solver will ever use now 55 million cells that's bigger than most computers can handle as a rule of thumb on this you're gonna need about six gigabytes of memory for every million cells that's approximate but that's a a relatively safe approximation it'll depend a little bit on the job and you can experiment a little bit yourself but uh for the the purposes of this study i'm just going to use 2 million the other thing i like to do i like the refinement strategy to be periodic based on travels travels is the number of times that the flow would move through the domain through the entire domain so we'll leave the default parameters here you'll notice that that it it won't start refining until it's gone through two travels and then every travel after that it'll refine um and then this relaxation interval just says that well once once it's done a travel and refined don't stop right away at least wait for two tenths of a travel to see if anything's changing now jump back to finishing and you'll notice a new parameter here refinements you could tell it hey i don't want i don't want to even consider the flow solver stopping until it gets to pick a number let's just say five another thing i've i've learned here is that goals criteria the analysis interval like to change this to manual and make this number 2 instead of 0.5 by by default it goes to 0.5 this has the flow solver average the goals over 2 complete flow travels um to check for convergence okay and that's all we need to do on this tab refinement is done solving we don't really need to change anything here these are things that are useful later in particular if you're doing multi-physics kinds of things where maybe you're you're doing a heat transfer problem combined with cfd saving one thing i like to do is uh save the full results periodically um and i'll just base it on wall clock you can change it on base it on iteration but what this does is it says every hour it's going to solve the complete flow solution so at most if your computer crashed or something you would never lose more than an hour's worth of work which is nice considering the fact that some very large jobs can take days you don't want to waste that time okay you just click ok and we're ready for a flow solution to run a flow solution all you need to do is click the run button now what i'm going to do is pause it right away because there are some things i want to show you and it'll run very quickly and i won't be able to show you if i don't pause it you don't have to do the pausing when you run a test case so you can neglect that part of it but i'll go ahead and click run and since this is a new job the only option i have is to solve a new calculation this is a nice feature if you have access to computers that are faster that you can run off site you can set up different machines you can send your jobs to so you can still use your local computer for whatever whatever you need to do and the job will run on remote computers but i'll run it on this computer now and then just click run you'll notice this little monitor window down here i'm gonna suspend this so i can the monitor kinda defaults to what you had set up last last time i'm gonna delete these now you notice the the job is suspended that's why you don't see anything changing the total number of cells for this starting condition is only you know 4 700 cells it's it's tiny it'll run very fast initially but i did that on purpose just so you could watch some of the the solution it's already gone 16 iterations just in the time it took me to open this thing up and it's already gone 0.375 travels i'd like to do is insert a goals plot so i'm going to click on this and you can plot all your goals you notice here you're going to get by default this normalized view of your goals and then also current value and average value while this is somewhat useful i really don't like looking at normalized goals because they're scaled so much that sometimes you're fooled into thinking things are converged i actually like to go in here and right click right click on that on that screen change this to travels change the scale mode to the absolute scale and then usually i pull this length scale down a little bit and if i apply it you'll see here that it's rescaled everything and i can actually see a little bit better what my my uh goals are i might change this again it might i might go in here manually later on and change the min and max but we'll leave it here for now now it's also nice to be able to watch the flow develop itself so now you come up to this little tab insert preview click on this and it says okay what planer do you want to look at so the plane name actually if you click back here on the solidworks tab this green plane yep that's the plane i want to see it's the front plane so front plane no offset because it's right in the middle that's one of the reasons i used the mid plane offset so i didn't have to change this plane offset i want to look at velocity let's say it shows better gradients than pressure usually but you can look at all these different things but let's just look at velocity and i want the image to be pretty big so i'll set this to 5000 that's that's the biggest you can actually set the image to um it's nice to be able to display the mesh so you can watch the mesh refined so i'll click on that you can also refine the region if you want to reduce the region that you're going to display but i'm going to show the whole computational domain so you can see that click ok all right it does and it won't show up yet um until i actually let it run so let me go ahead and allow the flow to solve a little bit and now you see the flow is actually solving on this mesh let me pause it again so i can show you something else if you go to info tab you see the travels have gone to 1.175 if i unsuspend it you're 1.2 you see it growing when that gets to 2 you're going to get the first remesh so let's let's wait for that ought to happen any any second now look down here where it says calculation boom look it did the remesh everywhere there's a strong flow gradient that starts to put more mesh elements and so you you can see how it refined the domain it's almost ready to remesh again and boom there's another one you see how much the goals have been changing and i'm up here to 3.5 travels just about ready to remesh again there it goes again and now you'll notice it'll start running slower now we're up to 65 000 elements which is not really that that tight but it's still considerably larger than than where it started i'm going to pause it now your mesh start is going to start looking so tight in areas that it's difficult to see the flow so you might you might come in here and make another one and just go ahead and plot the exact same thing but just turn off the mesh and if i run that again you'll see another one will pop up here and now i can actually see the the flow pattern a little bit better and even start to see the the boundary layer and so forth and this will just get you know tighter and more refined as as the flow solution runs now let's go over and look at these goals i'd like to look at this area a little bit closer this is where i might want to change the manual minimum and maximum you notice i've changed the manual minimum and maximum so i can get a better view on what these unknowns are are doing and you'll see they're they're definitely not not converged yet still quite a bit of of oscillation we're already up to about 173 000 elements you'll notice how much slower it's running now look at the look at the travels if i unpause it now you can see quite a bit quite a bit slower so it's going to take a while to get to the new uh to the new refinement this this is very often the case i mean early on you'll get you get a lot of variation um and then these these unknowns will just keep keep changing and floating around um very often what they'll start to do is level off in between travels and then sometimes jump when a travel when a travel changes and you have a refinement don't be fooled into thinking that it's converged once these level off your best indication of convergence is after several different mesh refinements have happened you don't get any change anymore and so you might have to run your first test case with any geometry for quite a long time and let it refine to as much memory as you have and and look at the convergence characteristics of the the job you're running so i'm going to let this run for a bit and then we'll come back and look at it later i've run this test case for about 15 minutes now and you see it's gone about seven travels here like things are leveling out but don't be deceived by that let's look at a couple of things look in the log and you can see we've had one two three four five six refinement cycles we're at about 523 000 elements and you can see here in terms of how many iterations that run travel and so forth what you're going to notice though is that the number of elements won't actually get any larger than this because we've told it don't refile don't refine any more than than five levels it may be possible that that's not quite enough for this test case especially since i started with such a coarse mesh so what would end up happening that you got to be careful about is that you could just let it continue running at this point and you'll notice everything will just stay flat but that's because it can't really refine the mesh anymore it says it's still refining but it's not really refining the smallest elements anymore what it's just doing is changing the distribution as the gradients change so what you can do while the solver is running is go up to calculation and you can actually change the calculation control options on the fly i'm gonna bump the refinement level all the way up to seven and i can leave the maximum number of cells the same because i haven't i'm not even close to the limit yet now if i was close to the limit i'd try to bump that up as well but just change that one parameter hit okay and we'll let it run longer and then i'll come back and show you what the effect was i've let the flow solver run for about two and a half hours now so let's just review where we are you'll notice now that the total number of cells is about 1.7 million i've gone about 1100 iterations and you can see here in terms of the travel total time and and so forth in terms of the number of refinements 1 2 3 4 5 6 7 eight nine refinements and since we set the maximum number of refinement level to seven that means that you could take the uh there the smallest elements will have been refined up to seven times and look what it did to the convergence remember where we were before was around six six to eight travels and it was stuck at about five hundred thousand elements because even though it was continuing to refine the refinement level was only set to five so the elements were never increasing beyond five hundred thousand you could see how you could easily be fooled into thinking that this solution was converged because after after six travels there's very little change in the solution but as soon as we made that change that uh was done at at number of travels of eight you see significant changes happened in in terms of the the goals the number of elements went from 500 000 to about a million and a half and then went up from there at the subsequent refinement you see big changes in a transient and then there's certainly a shift in the maximum so in terms of the y force for example you see where the the new leveling is up here and before we could have been fooled to be thinking it was here same thing for the the torque and also the the x-force so now what you want to do is you want to make sure that you don't continue to to get any kind of changes as the number of elements increased what i did in this for the sake of time so i can get this video out instead of waiting for 10 travels i forced a refinement at about nine and a half or 9.6 and i did that by simply hitting this refine button that's nice in a pinch if you want to do a quick refinement but probably would have been better off to let it hit 10 but but still you notice even though the number of elements went up very little change happened in the solution i'll let it run longer but i'm pretty convinced that this solution is converged and these are the actual values that we're gonna we're gonna get for the unknowns you'll notice it shows that it's not converged and that's because we told it to average over two travels before it before it checks for convergence and you see here it's only been about one travel one and a half travels maybe that it's settled down so i might stop this job manually but the flow solver won't stop until all of these hit green
Info
Channel: Andy Arena
Views: 1,341
Rating: undefined out of 5
Keywords:
Id: Ib6cIg_bq1M
Channel Id: undefined
Length: 34min 16sec (2056 seconds)
Published: Sun Jan 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.