in this video show how to build and run and validate a 2d wing and sim center star ccm plus okay so here i have a new simulation i want to start by expanding geometry and i'll right click here and go to new now there's a few different options to create geometry one i can import geometry from another source i can import that as native file formats parasol and iges step stl there's a number of different options usually parasolid is one of the best ones another option is to create the cat inside star seam plus or i can import it from another cap program and actually link to it so actually link into exposed design parameters and those come into the software um into star city and plus that is so i can change the parameter and it updates in both programs now in this case i'm just going to import a curve and then develop the geometry inside the software so to do that first i need to get the curve so i'm using a source of data from airfoil tools in that we have x y and in this case z for z i just put in a bunch of zeros but for for this data it follows from the leading edge across the top of the airfoil back to the trailing edge so as you scroll down here you eventually hit one so that's the trailing edge and originally in the data it jumped back to the leading edge and went on the bottom of the airflow back to the trailing edge so i need one continuous curve to work with so basically i took all this data and flipped it upside down so that instead of it going from one back to zero we went from one to one and then followed it back to the leading edge across the bottom of the airfoil so once i have that data then i and that's just saved as a csv file i can right click this go to import 3d curves and then i browse to my file i click the file that i want hit open i'll import it as a polyline and close the curve and hit ok and once i do that i have my airflow so now i have this sketch 3d i can right click this and extrude it and this looks pretty good so i'll just keep that as is and hit ok now some controls for the left left mouse button when you hold that down you can create a point of revolution about that so here i'm doing the leading edge this is the trailing edge down here right click is pan and the middle mouse button is zoom in and out there's also hotkey so if i press t for top there's f for front and there's s for side now one thing that's important is in 2d simulations you need the geometry to reside on the z is equal to zero plane if i want to see that i can click this global plane here and i can see that this does reside on that plane i could also see that from that csv file that i created now i do need to make the domain geometry so i'll actually right click this plane and create sketch and then zoom out a bit and create a rectangular domain now i want to make this about 25 chord blinks out away from this the cord in my case is one meter i could also use this measuring tool to figure that out i'm going to click once and click twice to see what that distance is now to make this a little bit easier i'll just change the spacing here by clicking this and set this to 25 and then hit ok and then when i zoom out i can just move these and place them where i need them and then they just click right in place and then i'll hit okay now once i have that i'll right click this go to extrude again now i've got to name some of these faces and this is kind of hard to click so i want to make this distance a lot bigger and body interaction i want to set the none for merge should basically bullying unite the two bodies and i don't want that so now i'll hit okay and once i have that i have these two different bodies here so as you can see here that's my wing so i'll rename this to wing i'll just hit f2 on the keyboard you can also right click and rename if you want this i'll just rename it to domain and then under these you have name faces so i will split this out in just a moment but for wing i'll just rename this as wing and uh like i said i'll split this out so to split this out what i'll do is right click on these surfaces now if you get disoriented like i can't see where the actual wing is and which way it's pointed i can come up here and hit transparent and then i can zoom in and okay i can see it's going that way so in my case i'll hold down control so control click click and click and those will be my three inlets so i'll right click on that name it inlet flip around to the back right click this outlet and then uh this face and the other face here this needs to be named as two different surfaces it doesn't really matter what they're called so i'm just renaming this as one rename this oops this as two and as i've done that renaming you can see here now all of those different faces one other thing that i want to do is be able to take this wing and rotate it so i'm going to right click this and go to transform rotate and here if i zoom in you can see that it's rotated this geometry and it's rotated about the global coordinate system which is right at the leading edge i want to rotate this 10 degrees so i'll change that here and i don't want it rotated this way when it rotated the opposite way so i'll flip the axis direction to negative 1 for z and then i do want to expose a parameter so i can so that i can go back and change the angle of attack pretty easily so i'll click this here hit expose parameter and let's just name it aoa for in google attack and then i'll hit ok and i'm good to go here so i'll hit close 3d cad and now when i expand this i have two different body groups i have domain and wing so i'll hit or i'll hold down control and then right click this and select new geometry part now here i'm going from a 3d cad model to a tessellated surface so essentially i'm going to a bunch of triangulated surfaces now i won't go into detail but that is a needed step in order to actually get into meshing so i highlight that because some people ask about the difference between 3d cad and parts i'll accept all the defaults here and hit ok and now you can see domain wing under parts now i'll come down to operations and the first thing you want to do is subtract the wing out of the domain so i'll go to new boolean and subtract and for the input parts it'll be both these and then for the target part basically what remains uh will be domain and then i'll select uh perform cadbullion and tell it to execute and then hit okay so once that executes it spits out a new piece here under parts so i do it this way because say if i were to import new geometry up here i can then feed it down into parts so i have my new wing geometry and then i just basically swap it out and subtract and it'll spit out new geometry and that new geometry which is always this piece will always be fed down into the rest of the setup so it's a good way to pipeline it instead of doing it in 3d cad it makes it a little bit messier anyways the next thing i'll do in operations is go to uh mesh and batch for 2d meshing this basically identifies that geometry that lies on that z is equal to zero plane so i'll select subtract tell it to execute and hit ok and once that's done now i'll go back to operations again for final time go to mesh and automated mesh 2d i'll select the geometry select the polygonal mesher and the prismatic layer measure and you'll see more on this later and then head okay now for now i'll just keep this as is i won't adjust it and you'll see why i'll go through and iterate on the mesh just a little bit so you can see what the settings actually are instead of me just plugging in values but one thing i will highlight here you have a bunch of default controls and this is basically all the global sizing for your mesh so i won't change this right now so let me go ahead and move on to the next step and that next step is to establish the pipeline between parts um so this stuff here and the rest of the simulation setup so to feed the pipeline down into the rest of the process i need to right click the subtract remember this is what we're meshing and everything down into the regions level so the regions is what is accepting the mesh and you're applying physics to that mesh in order to get the solution that you want so assign parts to regions this is what i'll select and i'll change this one setting here to create a boundary for each part surface that we have a wing an outlet and a inlet and then i'll hit apply and close and now since i've done that now region's populated with that stuff that i just made or that i just pushed down to the level i'll right click continua new and select physics continuum and i'll right click models select models for space i'll select two dimensional for time i'll select for material i select gas flow i can do segregated or coupled it's 50 meters per second in my case in this case i'll just select segregated equation of state i'll do constant density there's no density changes for viscous i'll select turbulent and then i'll select k epsilon turbulence and keep in mind auto select recommended models is on so when i select this it will automatically select a few other things here now there's nothing else to really select these are additional options this is everything that has been selected so i'll go ahead and select close under reference values one thing to highlight is the reference pressure and this is just setting the gauge pressure but this is atmospheric pressure at sea level and then there's some initial conditions this one i will change for velocity i want to initialize 50 meters per second in every single cell to start with if i didn't do this all the cells would be zero meters per second and so i would have to rely on the boundaries to push flow into the domain and wait for that to propagate all the way through so this will speed it up if i put it to 50 and zero for y so 50 meters per second and x 0 and y now i'll move down to regions and you can see a few things here when i select these boundaries a you can see what it's connected back up to higher up in the pipeline and then you can also see the type it's set to so for an inlet to be set to wall that's probably not the most appropriate thing so i'll adjust this to velocity inlet now you have to consider that in physics conditions for this it's it's automatically set to boundary normal so if i have a boundary if you think about that top view that that we had here i'll actually create a geometry scene there's a little shortcut here for that if i click that and i set this to transparent so there's my wing and remember this this and this are inlets so if i by the way if i click that it'll highlight it anyways this is boundary normal it'll be pushing flow in this way and pushing forward in this way and pushing flowing this way that's not what i want i want all the flow to be going across the screen so for flow direction specification i'll change this to components and when i do that now and everything kind of follows a top-down appearance so when i change something up here it usually trickles down to the node below it in physics values now i can specify the direction in the direction uh here's x and here's y well the direction is in x and that is correct um so i'll go down to the next boundary next one again for the outlet this is set to wall so i don't want that i'll change that to pressure outlet and when i do that i can see the gauge pressure it's up to so that's fine and the final boundary here is the wing it's set to wall which is correct we need a badge earlier to develop on that so that's good so i'll keep going down and there's really nothing left to change here so what i'm going to do now is start messing around with the mesh if you remember i said that i kept all the default values so let me mesh that and we'll take a look at it so it's already done meshing produced this many cells you can see the time it took again i'll come up to my shortcut up here to make a mesh scene and you can see what this looks like so let me come back up to mesh settings to make sense of this there it is automated mesh 2d and the default controls so the first setting here is something called a b size this is something that all the other settings by default reference so for example if i click target surface size so this is a target size that will happen at the surface it's automatically 100 of the base size so for the base size what i normally recommend is to use a size that you will most commonly see in all of your cells so in our case we don't really have a complex geometry this doesn't even really look like inner foil but one of the things that i'll do in this case just as a rule of thumb is to take the the cord length and divide it by 100 and that will be used as my base size so in my case i'll put this as 0. 01 and now you can see if i click target surface size again the 100 of a size has changed to an absolute size of 0. 01 meters same thing for minimum surface size and this is basically the smallest size you can get down to if it really needs to refine something like a tightly curved surface for example is 10 of the base size so this should work as a starting point for the airflow keep in mind that that small sizing now applies to everything so i do need to constrain these outer boundaries to be larger because i don't want this small size applying all the way out here because i don't really care what happens out here i really care about what happens around the the wing so i'll go to custom controls new and surface control and when i do that i do this i'll click it and then part surface i will apply this to the inlet and outlet and once i've done that under controls i have to tell it how to control it so i'll say okay i want the target and minimum surface size to be just one size but i do want to customize them so i'll talk to customize and then for values i'll control click both of these and for the sizing i i know that i want to put it as three meters now i don't want to have to try to back calculate what that is in my head so i'll just change this from relative to base to absolute and so now i can just put in three meters and that's good to go so i'll go ahead and come up here and hit mesh and now you can see the largest sizing applied out here and now we actually have a wing the downside to this is that here the leading edge is kind of chunky looking that needs to be refined it's very faceted um this needs to be refined more the other one is the um the boundary layers are not captured enough by what i have here and these are the prismatic layers that are referenced earlier we need more layers in here to be able to actually capture the battery layer these are too thin and the other problem is is the cell that sits here compared to this cell they are definitely not really the same size we want to try to blend this as well as possible between the prismatic cells and the bulk mesh so that there's a nice transition from these cells to the polygonal cells so to do that i'll come back up here and change the number of prism layers to five now five is very very conservative i should probably put a lot more layers in this but i'm going to lean and lean in the way of a faster solution but you could definitely add in more layers to resolve all the way down to the smallest parts of your boundary layer next to the wall which would really ideally be needed for a validation level study but this this does a pretty good job of coming pretty close in terms of accuracy but it doesn't take as long to run so the other thing i want to do is stretch out those layers so i'll go to prism layer total thickness and stretch it out from 33 of the base size to 100 and what that will do is it will um it will basically stretch these layers out to be you know instead of here it'll be somewhere around here and uh this outer cell will be much closer in size to this so let me go ahead and hit mesh on this and we'll see what it looks like so that looks pretty good except that i forgot the leading edge part so let me go down here to custom controls and to enable that leading edge refinement i don't have anything in the geometry that really identifies a leading edge so i can make an arbitrary shape and say to the software that i want to refine within that shape so i can do that by selecting a volumetric control now the volumetric control is going to ask me what am i refining within and i don't have any geometry that specifically calls out this leading edge like i mentioned so um in this what i can do is go back up to parts and there's kind of a shortcut to make just simple geometry for this reason so i can go to new shape part and cylinder and here i get cylinder okay now it's position it's perfect but it is a little bit too big so change this to 0.
07 and now when i zoom in that looks pretty good by the way if you ever want to change this view so that you're always top down on it you can come up here and change projection mode to parallel and now i'm always on top of that anyways i'll hit create and close and then once i've done that i have this cylinder so now i can go back down to my volumetric control and for parts i can select the cylinder hit ok and now it knows what to refine within but it doesn't know what to do or how much so i'll tell it that i want to refine the 2d surface measure and for values i'll give it a custom size of 50 so now i can come in here and again hit mesh and now you can see that what that refund looks like so this looks pretty good especially for refining the stagnation point and then also getting this leading edge so that's much better so now as a final step i want to refine uh the weight of the body and just these cells that are kind of around this now to do that one of the things that i can do is change the surface growth rate so um it's just basically controlling how fast these cells can grow out in size so i'll change this from default to user specified and i'll change it down to 1. 2 now to control the wake behind the body i can enable a surface control to basically pattern this surface out in a direction and tell it to refine this so to do that i can go to custom control new surface control i'll scroll down here to surface control 2 i'll tell it to apply itself to the wing hit ok or enter on the keyboard and under controls i'll give it a week refinement so i'll hit the check mark box on that and under values when i click this i have to give it a distance in my case now your scenarios may change a little bit but i can use the roller icon here and measure out how far i want this to be i know i want this to be about four meters so i'll change this to four the direction is correct it's in x which is fine and then i will go ahead and give it a size in my case i don't want to make it too small because it's going to refine everything that's within that kind of patterning so in my case i will make this 400 of the base size and i'll go ahead and tell it to mesh okay so now you can see that patterning all the way downstream and you can see some nice growth out into the bulk mesh now you can always play with a mesh to determine what the best balance of accuracy and run time is for your scenario so now that i've completed that i'll come back down here to where i left off so i left off right here i'm not going to go through derived parts and there's nothing to particularly change in solvers and stopping criteria you can see the maximum steps is set to 1000 by default which should be fine for my application technically i won't know until i start solving it what the convergence will look like and i'll need to look at that to really determine what that is but a thousand should be fine i'll skip past these two and make my way down to reports so here i'll right click this go to new report and under flow energy i'll go to force coefficient and this will be my coefficient of lift report so i'll rename that now for a coefficient of lift report that should be in y for the direction so i'll put in 0 1 0 and then force option pressure and shear that's fine the reference pressure is 0 pascals that's fine as well the reference density in my case is 1. 2034 so i'll put that in the velocity is 50 50 meters per second and then for the reference area that's going to be the platform area and i actually have to run a report in order to get that data now i can actually cool thing is that report i can integrate directly into this so as i change an angle of attack i don't really have to worry about manually plugging in this number every single time so let me actually go in and make that report so i'll go to new report metrics and frontal area and for this i'll change the mean to frontal area y for the view up i'll put this to 0 0 1 and for the normal i'll do 0 1 0.
so this is x y and z and then for the parts i want to apply this to under regions my wing and hit okay now i can go back to my coefficient of lift report and under reference area i'll hit this and then i'll do that one more time and this opens up a new option for me so if i type in report you can see the two different reports that have so far so i can double click the frontal area y report and that puts in the language for that so i can hit ok and hit ok again and now that embeds that report in the reference area now under parts i need to apply this to my wing boundary under regions and hit okay and i have my coefficient of lift report now um i can right click and copy this or um and then come up here and then paste um i like it a little bit better to just simply click drag and then drop it on the reports and that makes a copy so i'll do that for cl to make a cd report and then i'll just change the direction so cd would be 1 0 0 for x and then this would need to change right because i need not the frontal area y report i would need one in x so i'll make a copy of frontal area y and then change the name to frontal area x and then when i do that i would just need to change the normal to zero or sorry one zero zero so now i can go back to cd and find that area report there it is so this is still applied to frontal area y so i'll just change this to packs and that should work just fine now under reports the reports you can right click and run the report i don't have a solution right now so it's not going to come up with anything but see it's all zero but it'll give you data down here which is okay another step up that you can make is to create a monitor so i could like right click this and create a monitor from this uh in this as it runs you'll get data down here and it's just simple text data and it'll update every solid iteration which is better but to go all the way with this i can create a plot from that monitor um and that will show me a visualization of an actual plot on the screen so let me go ahead and do that so i'll control click both of these right click and create monitor and plot from a report now since i did both at the same time it'll ask me if i want to put them both in one plot multiple plots i'll say multiple plots just my own personal preference and now it's went ahead and created a cb and cl plot there's also a residuals plot down here i won't get into residuals and what they mean but that's one of the things that it creates by default now moving on down i have scenes here and i can see some of the scenes that i've been making so i can see that geometry scene that i made earlier and can also see that mesh scene i'll make two other ones this is basically the same shortcut that you saw up here um but i'll make one for a scalar scene uh and these scenes are all just templates um the templates have uh displayers built into them that show like outline and you know scalar and so on and so forth but under scalar one what i want to look at is um velocity magnitude so under scalar field i can put in velocity and just start typing it and change this to magnitude now you can really change this to whatever you want you can change it to velocity and y static pressure you know whatever you want but another thing that i want to look at is what the vectors look like so i can right click new scene and select vector so under vector again you have multiple displays these can be thought of as layers you can actually add in more layers to each one of these scenes so you can layer up different things in the scene and make some really nice visualization but under vector scene 1 one thing you'll notice in here actually sorry it's here factory one is the display mode ascetic glyphs so they're actual you know vectors that are shown in the scene um i personally like the line integral convolution it looks like uh basically streamlines on a 2d plane i'm just going to use that and then for parts it's automatically applied itself to region and for vector field it's already started to use velocity so all that's great so now that i have that i'll go ahead and start running this i'll do some split screens here so you can kind of see how this the run on this evolves okay so i can see cd and cl are not really changing anymore they've hit convergence um so i i can go ahead and hit stop on this even though we haven't hit a thousand iterations yet so i'll hit stop and i have some experimental data for the coefficient of pressure so i want to import that in and uh and plot that against my results here i'll right click plots here go to new plot in xy plot in this under parts i want to apply this to my wing and i'll hit ok here for x type and here you can see this plot so for x you can see it's direction in x so that is correct that doesn't actually need to be changed so i'll go down to y and for y type you can see it's set the scalar and the scalar function that's uh well that i need to set it to is uh pressure coefficient so i'll select that you can see that it's applied to the wing here now one thing to keep in mind is the pressure coefficient doesn't have some of the data that is relevant to our case so we do need to go in and change that so what i'll do is i'll go to the very bottom of the simulation tree and when i open this up under tools you'll see that there's a thing down here called field functions and if i expand that i can get into pressure coefficient and here i can adjust some of that data so the reference density as we put in before is 1.