Skip to content

How to implement a *.C file including a numerical integral function #17258

Discussion options

You must be logged in to vote

Dear @sSajjad90

The ElementIntegralVariableUserObject integrates a variable over the volume.
I think what you want to do is to integrate over the variable \rho; it is a one dimensional integral.

You could write your own custom material that calculates the integral using the coupled variable a_1
Then you store the integral in a material property
and you use the material property to implement a kernel for the second term in your last equation.

I think the most difficult part is calculating the integral, c++ probably does not have a function for that.
Otherwise, you will need to write your own .C code to integrate your function using an iterative method to check for convergence
because your …

Replies: 1 comment

Comment options

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