CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

How to implement flux vectors

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

LinkBack Thread Tools Display Modes
Old   August 8, 2012, 04:49
Default How to implement flux vectors
New Member
Dean Meyer
Join Date: Jul 2012
Posts: 4
Rep Power: 7
DeanM is on a distinguished road
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.

DeanM is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

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 21:11
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09

All times are GMT -4. The time now is 14:36.