|
[Sponsors] |
August 8, 2012, 04:49 |
How to implement flux vectors
|
#1 |
New Member
Dean Meyer
Join Date: Jul 2012
Posts: 4
Rep Power: 13 |
Hi Foamers,
is there a clever way to implement an equation with different flux vectors? For example I try to solve an 2D equation of the form: ddt(A) + ddx(B)+ddy(C) = 0, where A is the vector containing the 4 unknowns and B,C are the flux vectors, which contain again the unknowns and some constants. On the paper I have done this in two steps, solving X = -ddx(B)-ddy(C) using various spatial discretization schemes, for example central differences. My second step is then to solve ddt(A) = X, using backward Euler time discretization to update the unknowns. Thus in the theory it is not difficult, but since I am new to OpenFOAM and C++, the application is quite hard. My current problem is the implementation of the spatial derivatives in only one direction. Furthermore I am looking for a sophisticated way how to setup the flux vectors itself after defining the fields of the unknowns in createFields.H. Thank you in advance for any hints. Dean |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
heat flux vectors | keeper | CFX | 9 | May 4, 2012 07:12 |
Problem setting with chtmultiregionFoam | Antonin | OpenFOAM | 10 | April 24, 2012 09:50 |
Implement constant heat flux boundary condition | new_at_this | Main CFD Forum | 2 | April 6, 2012 23:35 |
implement heat flux | Tobi | OpenFOAM Programming & Development | 8 | January 21, 2011 20:11 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 20:09 |