-
Notifications
You must be signed in to change notification settings - Fork 27
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
Factory-generated boundary conditions with new case file interface [Preview] #1264
Open
timofeymukha
wants to merge
43
commits into
develop
Choose a base branch
from
feature/bc_overhaul
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timfelle
reviewed
May 2, 2024
timfelle
reviewed
May 2, 2024
timfelle
reviewed
May 2, 2024
timfelle
reviewed
May 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear all, I think I've accumulated enough changes to launch this preview of the new bc handling. It is now almost fully implemented for the scalar (excluding the user field Dirichlet), but not yet for the fluid, therefore the don't merge. I do want the CI to run through, to see what complaints, I guess.
Major changes
The
bc_t
typeinit
. Takesjson_file
andcoef_t
. Some derived types now use this to parse the JSON they need, e.g. the Dong condition, the Blasius, etc.init_from_componets
in order to construct without JSON.finalize
. Most types just call thefinalize_base
inbc_t
, butsymmetry
andnon_normal
run their logic for determining the normal direction here.bc_list
to do that. I haven't actually used this yet, so maybe these will be removed later on.step
routines for the solvers, we need to be able to distinguish between weak and strong bcs. Sobc_t
no has an additional componentstrong = .true.
to mark a bc as strong or weak.The
bc_list_t
typebc_list_add
are now TBPs, which simplifiesuse
statements quite a bit, and is generally the way to go.field_list_t
. Some differences remain though, e.g. for thebc_list
we track both the capacity of the list and the number of allocated items. We need to think a bit more about this.apply_
routines are augmented with an optionalstrong
parameter, which will lead to only applying strong or weak bcs. As a result, we can use a single list to store all the bcs and then call apply with eitherstrong=.true.
orstrong=.false.
when needed in thestep
routines.The
zero_dirichlet_t
typeThis is a rebranding of what used to the
noslip_wall
. The bc just assigns both vectors and scalars to zero. What I realized is that we have a lot of places in the code where we use a zero-valued Dirichlet for the purpose of marking boundaries for the linear solver routines. Usingzero_dirichlet_t
helps with clarity there.The
bc_factory
subroutinescheme
. So perhaps, what will happen is that eachscheme
has its own factory.field_dirichlet_t
yet.The
scalar_scheme_t
typebc_list
calledbcs
to store the boundary conditions and constructs them with a factory. This results in quite a bit of cleanup here and there.bclabels
.boundary_conditions
is used, which is an array of JSON objects, similar to how we do sources and simcomps. Each object has thetype
andzone_index
keyword + other keywords needed, for that type.Remaining work
fluid_scheme
. I don't think it will become as "clean" as scalar because there are quite a bit of auxiliary bcs that are defined and will probably remain as additional components of the type.