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

How to solve simultaneously for a PDE and a linear algebraic equation?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2020, 06:34
Default How to solve simultaneously for a PDE and a linear algebraic equation?
  #1
New Member
 
Saumava Dey
Join Date: Sep 2020
Posts: 29
Rep Power: 6
saumavadey is on a distinguished road
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).
saumavadey is offline   Reply With Quote

Reply

Tags
fvscalarmatrix, new solver, nodal values, simultaneous


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
How to solve this coefficient form PDE in OpenFOAM? lupe123 OpenFOAM Running, Solving & CFD 2 January 16, 2020 08:16
Original PDE of a runge-kutta descritized equation ooo Main CFD Forum 1 February 10, 2014 12:23
Reynolds transport, turbulence model, etc Beginner Main CFD Forum 1 January 7, 2009 06:36
Linear Iterative Solver + Elliptic PDE cfd101 Main CFD Forum 0 November 14, 2005 19:59
Quasi, Non -linear....pde Seeking. Main CFD Forum 3 November 5, 2003 09:28


All times are GMT -4. The time now is 11:39.