CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Beginner: Implementing source terms dependent on other variables

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 12, 2018, 12:52
Default Beginner: Implementing source terms dependent on other variables
  #1
wvn
New Member
 
Join Date: Jul 2018
Posts: 3
Rep Power: 7
wvn is on a distinguished road
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.
wvn is offline   Reply With Quote

Old   July 16, 2018, 09:59
Default More information
  #2
New Member
 
Max
Join Date: Sep 2016
Location: Delft
Posts: 22
Rep Power: 9
WildeCat is on a distinguished road
Quote:
Originally Posted by wvn View Post
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
WildeCat is offline   Reply With Quote

Old   July 17, 2018, 11:10
Default
  #3
wvn
New Member
 
Join Date: Jul 2018
Posts: 3
Rep Power: 7
wvn is on a distinguished road
Fortunately, this issue has been fixed. Thanks!
wvn is offline   Reply With Quote

Reply

Tags
beginner, solver, source term


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 18:13
Dependent variables for linearized source terms ASimonsen Fluent UDF and Scheme Programming 0 April 5, 2017 02:20
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 01:22
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59


All times are GMT -4. The time now is 13:53.