|
[Sponsors] |
How to solve simultaneously for a PDE and a linear algebraic equation? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Saumava Dey
Join Date: Sep 2020
Posts: 29
Rep Power: 5 ![]() |
Hello Foamers!
I am just a fresher in programming in OpenFOAM. I seek suggestions in developing my new solver which has two simultaneous equations. My first equation is a PDE as follows: laplacian(K, H1) + C1*H2 == ddt(S,H1) The variable H1 is a volScalarField which will be solved for all the cells. The second equation is a linear algebraic equation as follows: [math]\sum[C2*H1] + C3*H2 == Q H2 is a variable which has to be solved at a particular node in the domain where the source Q is operative. So, the situation so arises is that the fvScalarMatrix dimension becomes (N+1 [math]\times N+1), where N is the number of cells. I need some ideas regarding how to code in OpemFOAM for solving the above equations simultaneously. Also, I want to know how should I define the variable H2 in the createFields.H file. I would also like to mention that in general, H2 may be required to be solved for 'n' number of nodes and hence H2 must be solved for 'n' nodal locations. In that case the fvScalarMatrix dimension will become (N+n [math]\times N+n). |
|
![]() |
![]() |
![]() |
Tags |
fvscalarmatrix, new solver, nodal values, simultaneous |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to solve this coefficient form PDE in OpenFOAM? | lupe123 | OpenFOAM Running, Solving & CFD | 2 | January 16, 2020 07:16 |
Original PDE of a runge-kutta descritized equation | ooo | Main CFD Forum | 1 | February 10, 2014 11:23 |
Reynolds transport, turbulence model, etc | Beginner | Main CFD Forum | 1 | January 7, 2009 05:36 |
Linear Iterative Solver + Elliptic PDE | cfd101 | Main CFD Forum | 0 | November 14, 2005 18:59 |
Quasi, Non -linear....pde | Seeking. | Main CFD Forum | 3 | November 5, 2003 08:28 |