gdtk-uq / gdtk

The Gas Dynamics Toolkit (GDTk) is a set of software tools for simulating high speed fluid flow, maintained at The University of Queensland and the University of Southern Queensland, Australia.
https://gdtk.uqcloud.net/
Other
61 stars 15 forks source link

GridPro structured grid fails to produce meaningful flow? #8

Closed jeremymoran closed 2 years ago

jeremymoran commented 2 years ago

Hi,

I have a simple blunt body 2D axisymmetric structured mesh that I generated in Pointwise, then exported in a Gridpro .dat format. It is a simple 4 sided domain. The mesh successfully imports using the following command:

-- IMPORT GRIDPRO GRID
gproGrid = "powerlaw_mesh_pw.dat"
grid = importGridproGrid(gproGrid, 1)

I then define a FBArray

-- Define the flow-solution blocks.
blk = FBArray:new{grid=grid[1],
                  initialState=initial,
                  bcList={west=InFlowBC_Supersonic:new{flowState=inflow},
                          north=OutFlowBC_Simple:new{},
                          east=WallBC_WithSlip:new{},
                          south=WallBC_WithSlip:new{}},
                  njb=nblocks/2, nib=2}

I can run the simulation fine, however when reviewing in Paraview the flow is unchanged from the initialState. I have attached my mesh and script files. Unsure if this is a fault on my end maybe with the boundary conditions, but no combinations have worked thus far. powerlaw_body.zip .

Whyborn commented 2 years ago

I just ran the script on my machine, and while the final state is certainly not a correct final state, it's different from the starting state. My suspicion is that the boundaries of the grid you imported are not what you would logically expect them to be. This is what I got using your initial formulation.

Final-Powerlaw-Flowfield

It appears that the north boundary should be the inflow boundary- making this adjustment (east = outflow, south = west = slipwall) gives this final flowfield.

Corrected-Final-Powerlaw-Flowfield

Obviously, if you want to perform shock fitting, this is a problem as we require the west boundary to be the inflow for the shock fitting. However, we do have a rotate function; rotateGridproBlocks(grid, RotateWestToThis, RotateSouthToThis), which returns a new StructuredGrid. So for your example, adding

RotatedGrid = rotateGridproBlocks(grid[1], "West", "North")

and passing that to the FBArray as the grid will make your example work the way you expect it to.

jeremymoran commented 2 years ago

Thanks, that solved my issue! The rotateGridpro is exactly what I needed, cheers!