
[Sponsors] 
May 31, 2011, 14:18 
Adding a cross product source term

#1 
New Member
lazersos@gmail.com
Join Date: Apr 2011
Posts: 11
Rep Power: 7 
I want to solve for 2Fluid (ionelectron) steady state flow. Now it seems that between mhdFoam and simpleFoam this should be possible. In essence I need to add a v x B term to the simpleFoam velocity solver. My guess is this should look something like:
Code:
{ fvVectorMatrix UEqn ( fvm::div(phi,U) ); eqnResidual = solve(UEqn == fvc::grad(p)+ fvm::Sp(qi,crossProduct(Ui,B))).initialResidual(); } 

June 6, 2011, 11:14 
Followup

#2 
New Member
lazersos@gmail.com
Join Date: Apr 2011
Posts: 11
Rep Power: 7 
Well I got a version to compile anyway, now I just have to figure out how to set my initial condition for my solver (gradient fields, etc). Here's the code:
Code:
volVectorField UxF; { UxF = U ^ F; // U x F Term //  Solve for Ion Velocity fvVectorMatrix UiEqn ( fvm::div(phii, U) + fvm::Sp(q, UxF) ); eqnResidual = solve(UiEqn == fvc::grad(p)).initialResidual(); maxResidual = max(eqnResidual, maxResidual); } 

June 9, 2011, 09:44 

#3 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 8 
Hello lazersos,
as far as i get it you add a source term called UxF and then you have to integrate it over the control volume. For that you call "+fvm::Sp(q,UxF)" to integrate UxF over each cell volume, right? But what is q here? thanks for a reply, rupert 

June 9, 2011, 10:24 

#4 
New Member
lazersos@gmail.com
Join Date: Apr 2011
Posts: 11
Rep Power: 7 
This is what I got to compile:
Code:
UxF = U ^ F; //  Solve for Ion Velocity fvVectorMatrix UEqn ( fvm::div(phi, U) + fvm::Sp(q, UxF) ); eqnResidual = solve(UEqn == fvc::grad(p)).initialResidual(); maxResidual = max(eqnResidual, maxResidual); 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to define a transient species source term?  aleisia  FLUENT  3  March 7, 2011 23:58 
Adding a source term to concervation of species equation  bernarde  STARCCM+  0  June 4, 2009 03:17 
Adding volumetric Source Term  mohanamuraly  OpenFOAM  0  May 17, 2009 22:00 
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 