
[Sponsors] 
March 17, 2013, 21:19 
Trouble adding a directional derivative source term

#1 
New Member
Chris Prohoda
Join Date: Mar 2013
Posts: 6
Rep Power: 5 
Hi everyone. Thanks for checking this.
I am a new OpenFOAM user, and I have been trying to create my own solver to model ferrofluid motion. In the model that I am using, there is a directional derivative source term (i.e. which I plan to approximate as where M and B are vectors). I have M and B set up as volVectorFields, and I want multiply the entire thing by a the volume of each cell over the (constant) density. It looks like the fvc::div function needs one surface scalar field, so I created a phiB in a similar way to the phi for velocity using Code:
(fvc::interpolate(B) & mesh.Sf()) Code:
phiB=phiB*mesh.V()/rho; fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U)  fvm::laplacian(nu, U) ); solve(UEqn == fvc::grad(p) + fvc::div(phiB, M)); I really appreciate your help. 

March 19, 2013, 17:51 

#2 
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 48
Rep Power: 8 
Quote:
mesh.V() > volScalarField rho > volScalarField I think you have to do linear interpolation for volScalarField before math operations. 

Tags 
directional derivative, ferrofluid, mesh 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
derivative of source term  denise  Fluent UDF and Scheme Programming  1  October 29, 2009 05:41 
OpenFOAM on MinGW crosscompiler hosted on Linux  allenzhao  OpenFOAM Installation  127  January 30, 2009 20:08 
DecomposePar links against liblamso0 with OpenMPI  jens_klostermann  OpenFOAM Bugs  11  June 28, 2007 17:51 
UDF Source Term Units?  Brian  FLUENT  1  October 24, 2005 09:15 
Directional Diffusivity of UDS Source  Greg Perkins  FLUENT  2  September 4, 2003 03:02 