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

Using variables from FCI grid files in the BOUT input #3058

Open
totork opened this issue Jan 10, 2025 · 1 comment
Open

Using variables from FCI grid files in the BOUT input #3058

totork opened this issue Jan 10, 2025 · 1 comment

Comments

@totork
Copy link

totork commented Jan 10, 2025

I am currently trying to set up 3D-MMS tests for very distorted grids in FCI. My solutions are generally dependent on the normalized radius rho and the poloidal angle theta. I want to supply the MMS solutions and sources via the input file. The problem here is, that the only coordinates I can use are x,y,z (afaik). Disregarding y here, x and z do not generally coincide with rho and theta. Is there a possibility for me to, for example, add rho and theta to the grid file and use them in the input file to set the MMS solution and source?

@dschwoerer
Copy link
Contributor

One way is to add some variables and then get them in the C++ code with mesh->get("theta") or the like. Then you can implement your expressions in C++.

See this PR for an example using an expression from an input file: https://github.com/boutproject/BOUT-dev/pull/2928/files

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

No branches or pull requests

2 participants