DiffusionCG

Discretizes a diffusion equation with the continuous Galerkin finite element method

See the DiffusionPhysicsBase documentation for the diffusion equation solved.

Continuous Galerkin Discretization

The volumetric discretization of the time derivative uses the TimeDerivative kernel. The diffusion term is integrated by parts and represented using:

The source term is added using:

The Dirichlet boundary conditions are created using:

The Neumann boundary conditions are created using:

commentnote

We could use a Functor object to cover every need, but the specialized objects are a few percent faster, depending on the case.

commentnote

The user may switch between using / not using automatic differentiation for the kernel and boundary conditions using the "use_automatic_differentiation". This parameter is only obeyed if the AD/non-AD object exists for the requested diffusivity / source / boundary value functor etc.

Input Parameters

  • blockBlocks (subdomains) that this Physics is active on.

    C++ Type:std::vector<SubdomainName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Blocks (subdomains) that this Physics is active on.

  • compute_diffusive_fluxes_onSurfaces to compute the diffusive flux on

    C++ Type:std::vector<BoundaryName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Surfaces to compute the diffusive flux on

  • diffusivity_functorFunctor specifying the diffusivity. A functor is any of the following: a variable, a functor material property, a function, a post-processor, or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:Functor specifying the diffusivity. A functor is any of the following: a variable, a functor material property, a function, a post-processor, or a number.

  • diffusivity_matpropMaterial property defining the diffusion coefficient

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:Material property defining the diffusion coefficient

  • initial_conditionInitial condition for the diffused variable

    C++ Type:FunctionName

    Unit:(no unit assumed)

    Controllable:No

    Description:Initial condition for the diffused variable

  • preconditioningdefaultWhich preconditioning to use for this Physics

    Default:default

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:default, none

    Controllable:No

    Description:Which preconditioning to use for this Physics

  • source_coef1Coefficient multiplying the source

    Default:1

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Coefficient multiplying the source

  • source_functorSource term in the diffusion problem. A functor is any of the following: a variable, a functor material property, a function, a post-processor, or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:Source term in the diffusion problem. A functor is any of the following: a variable, a functor material property, a function, a post-processor, or a number.

  • transientsame_as_problemWhether the physics is to be solved as a transient

    Default:same_as_problem

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:true, false, same_as_problem

    Controllable:No

    Description:Whether the physics is to be solved as a transient

  • use_automatic_differentiationTrueWhether to use automatic differentiation for all the terms in the equation

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether to use automatic differentiation for all the terms in the equation

  • variable_nameuVariable name for the equation

    Default:u

    C++ Type:VariableName

    Unit:(no unit assumed)

    Controllable:No

    Description:Variable name for the equation

  • variable_orderFIRSTOrder of the FE shape function to use for this variable (additional orders not listed here are allowed, depending on the family).

    Default:FIRST

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:CONSTANT, FIRST, SECOND, THIRD, FOURTH, FIFTH, SIXTH, SEVENTH, EIGHTH, NINTH, TENTH, ELEVENTH, TWELFTH, THIRTEENTH, FOURTEENTH, FIFTEENTH, SIXTEENTH, SEVENTEENTH, EIGHTTEENTH, NINETEENTH, TWENTIETH, TWENTYFIRST, TWENTYSECOND, TWENTYTHIRD, TWENTYFOURTH, TWENTYFIFTH, TWENTYSIXTH, TWENTYSEVENTH, TWENTYEIGHTH, TWENTYNINTH, THIRTIETH, THIRTYFIRST, THIRTYSECOND, THIRTYTHIRD, THIRTYFOURTH, THIRTYFIFTH, THIRTYSIXTH, THIRTYSEVENTH, THIRTYEIGHTH, THIRTYNINTH, FORTIETH, FORTYFIRST, FORTYSECOND, FORTYTHIRD

    Controllable:No

    Description:Order of the FE shape function to use for this variable (additional orders not listed here are allowed, depending on the family).

  • verboseFalseFlag to facilitate debugging a Physics

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Flag to facilitate debugging a Physics

Optional Parameters

  • active__all__ If specified only the blocks named will be visited and made active

    Default:__all__

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:If specified only the blocks named will be visited and made active

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • inactiveIf specified blocks matching these identifiers will be skipped.

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:If specified blocks matching these identifiers will be skipped.

Advanced Parameters

  • boundary_fluxesFunctors to compute the diffusive flux on each Neumann boundary'

    C++ Type:std::vector<MooseFunctorName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Functors to compute the diffusive flux on each Neumann boundary'

  • boundary_valuesFunctors to compute the diffusive flux on each Dirichlet boundary'

    C++ Type:std::vector<MooseFunctorName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Functors to compute the diffusive flux on each Dirichlet boundary'

  • dirichlet_boundariesBoundaries on which to apply a fixed value

    C++ Type:std::vector<BoundaryName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Boundaries on which to apply a fixed value

  • neumann_boundariesBoundaries on which to apply a diffusive flux

    C++ Type:std::vector<BoundaryName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Boundaries on which to apply a diffusive flux

Boundary Conditions Parameters

  • initial_from_file_timestepLATESTGives the time step number (or "LATEST") for which to read the Exodus solution

    Default:LATEST

    C++ Type:std::string

    Unit:(no unit assumed)

    Controllable:No

    Description:Gives the time step number (or "LATEST") for which to read the Exodus solution

  • initialize_variables_from_mesh_fileFalseDetermines if the variables that are added by the action are initializedfrom the mesh file (only for Exodus format)

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Determines if the variables that are added by the action are initializedfrom the mesh file (only for Exodus format)

Restart From Exodus Parameters