Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panzer: Write a sideset field to an Exodus file #13612

Open
delcmo opened this issue Nov 17, 2024 · 7 comments
Open

Panzer: Write a sideset field to an Exodus file #13612

delcmo opened this issue Nov 17, 2024 · 7 comments

Comments

@delcmo
Copy link

delcmo commented Nov 17, 2024

Hello,

We compute fields like the shear stress that are only defined at the boundaries since it requires the normals. Is there a way to write that field to the Exodus file?

Marco

@ccober6
Copy link
Contributor

ccober6 commented Nov 18, 2024

@rppawlo , @gdsjaar

@gsjaardema
Copy link
Contributor

gsjaardema commented Nov 18, 2024

If the boundary is defined as a sideset (Or, you define a sideset to match your boundary), then you can output transient variables on a sideset in the same way that you would output them on an element block...

Note that this is at the exodus API level, so I'm not sure how that has been hooked up at the higher-level application level.

@delcmo
Copy link
Author

delcmo commented Nov 19, 2024 via email

@rppawlo
Copy link
Contributor

rppawlo commented Nov 19, 2024

@delcmo - there currently is no support through the panzer interfaces for adding sideset values to an exodus mesh. We wrap a stk mesh object and write all data directly into stk. The stk_io package pushes the data to SEACAS/IOSS which uses SEACAS/Exodus to write the exodus format. The exodus mesh supports it as Greg noted, but It's not clear if all of the underlying IO layers STK->STK_IO->IOSS->Exodus support that. It probably does, but we have never had a request for that. @alanw0 - can we store sideset tensor data directly in stk and have it automatically write to exodus?

@alanw0
Copy link
Contributor

alanw0 commented Nov 19, 2024

@rppawlo yes that is supported.
To see an example, take a look at packages/stk/stk_doc_tests/stk_io/howToCreateAndWriteNodesetOrSideset.cpp.
The sideset test starts around line 220 and shows how to create the field on a sideset part.
Writing out the mesh is done down in the function 'verify_sidesetField_in_file', which ends up calling stk::io::write_mesh_with_fields a couple layers down.
Now that I look at it, this "doc test" is kind of convoluted. We'll try to clean that up and make it easier to follow. But it works. :-)

@delcmo
Copy link
Author

delcmo commented Nov 19, 2024 via email

@rppawlo
Copy link
Contributor

rppawlo commented Nov 19, 2024

Thanks @alanw0 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants