# Beginner: Implementing source terms dependent on other variables

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 12, 2018, 12:52 Beginner: Implementing source terms dependent on other variables #1 New Member   Join Date: Jul 2018 Posts: 3 Rep Power: 7 Hello all, I am attempting to validate a mathematical model for a chemical reaction that will eventually involve some nucleation physics. I am implementing the Convection-Diffusion equation multiple times for a number of species. The mathematical model involves a source term for species A being proportional (equal to for now) to the concentrations of species B and C. I have implemented this as follows: in "AEqn.H": Code: ```solve ( fvm::ddt(A) +fvm::div(phi,A) ==fvm::laplacian(D_A,A) +(C*B) );``` However, when I compile the solver and run a test case, the results suggest that the "+(C*B)" term is ignored. C and B have their own corresponding equations that need to implement similar terms. Thanks! Last edited by wvn; July 12, 2018 at 17:22.

July 16, 2018, 09:59
#2
New Member

Max
Join Date: Sep 2016
Location: Delft
Posts: 22
Rep Power: 9
Quote:
 Originally Posted by wvn Hello all, I am attempting to validate a mathematical model for a chemical reaction that will eventually involve some nucleation physics. I am implementing the Convection-Diffusion equation multiple times for a number of species. The mathematical model involves a source term for species A being proportional (equal to for now) to the concentrations of species B and C. I have implemented this as follows: in "AEqn.H": Code: ```solve ( fvm::ddt(A) +fvm::div(phi,A) ==fvm::laplacian(D_A,A) +(C*B) );``` However, when I compile the solver and run a test case, the results suggest that the "+(C*B)" term is ignored. C and B have their own corresponding equations that need to implement similar terms. Thanks!
You need to provide a better picture of what you did for anyone to be able to help you

 July 17, 2018, 11:10 #3 New Member   Join Date: Jul 2018 Posts: 3 Rep Power: 7 Fortunately, this issue has been fixed. Thanks!

 Tags beginner, solver, source term