Skip to content

Enforcing periodic boundary conditions #16419

Discussion options

You must be logged in to vote

@tairoon1 I whipped up a little something for you on my MOOSE app. I basically copy and pasted the code for LinearNodalConstraint and modified it to solve the residual: R = u1 - u2 + A. You can find the source code here:

EqualValuePlusConstant.h
EqualValuePlusConstant.C

To use EqualValuePlusConstant (lack of a better name), just copy and paste these files into your own MOOSE app and be sure to change registerMooseObject("YourAppName", EqualValuePlusConstant); to reflect "YourAppName" in the .C file.

The object works pretty well, but proceed at your own risk. I didn't put very much effort into writing the code - just wanted to demonstrate how you, yourself, could begin to solve your proble…

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@tairoon1
Comment options

@crswong888
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@tairoon1
Comment options

@tairoon1
Comment options

@crswong888
Comment options

@tairoon1
Comment options

@tairoon1
Comment options

Answer selected by GiudGiud
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants