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

Structure Factor Fixes #180

Merged
merged 11 commits into from
Jan 29, 2025
Merged

Structure Factor Fixes #180

merged 11 commits into from
Jan 29, 2025

Conversation

ajnonaka
Copy link
Contributor

@ajnonaka ajnonaka commented Jan 17, 2025

-Cleanup logic for when structure factors are permitted and computed based on do_1D, do_2D, project_dir, do_slab_sf.
--This fixes the struct_fact_int>0 and (do_2D=1) case Changho reports.
-Prevent surfCov structure factor from being computed with nx=ny=1
--This fixes the nx=ny=1 and meansurfchem=on case Changho reports.
-Structure factors now report k space index in the plotfile when you query the "physical" location.
--The structure factor data itself is not modified; this only affects the "prob_lo" and "prob_hi" of the plotfile. This is a cosmetic fix only as it allows users using amrVis to easily see kx,ky,kz for a given cell in a SF plotfile.
Ffor uncoupled z-plane case (do_2D=1) the output structure factor is the average over each plane's individual structure factor. There is no SF for vertically averaged data in that case, it makes no sense to do that.

@ajnonaka
Copy link
Contributor Author

@changhokim @HyuntaeJung I think I've fixed all the issues you report EXCEPT being able to do mean-field surface chemistry with the do_2D and do_1D flags. The issue is that for do_2D it assumes the planes have normal z, which is incompatible with MFsurfchem being at the lo-z index. And for do_1D it assumes the pencils are in the x-direction, also incompatible with MFsurfchem convention.

… work in any direction

however if you run a 2D simulation in any context, the normal planes must be in the z direction - there is error checking for cases where there is only 1 plane to make sure the normal is in z
@ajnonaka
Copy link
Contributor Author

ajnonaka commented Jan 22, 2025

@changhokim @HyuntaeJung I have enabled the ability for mfsurfchem to work in any direction, controlled by project_dir.
By default project_dir is -1 so you MUST specify it or else the code will immediately abort if n_ads_specf>0.
If you want to do a 2D simulation (or decoupled 2D simulations), make the simulation have only 1 cell in z (or multiple cells in z if you want them decoupled) but then you have to select project_dir=0 or 1 to put the surface on the x or y wall for this to make sense AND also use do_2D=1 to turn off transverse fluxes.

@ajnonaka
Copy link
Contributor Author

The last thing I need to do is figure out how to run 1D case (both single pencil and uncoupled ensemble) to work with MFsurfchem - I suspect the pencils are in the x-direction and thus project_dir will have to be 0 but I'm not sure yet.

@ajnonaka ajnonaka merged commit 95a94eb into main Jan 29, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

1 participant