
[Sponsors] 
March 11, 2009, 06:44 
Hey openFoam experts,
i wan

#1 
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 9 
Hey openFoam experts,
i want to solve the following in openfoam navierstokesequation like in simpleFoam, tmp<fvvectormatrix> UEqn ( fvm::div(phi, U) + turbulence>divR(U) ); UEqn().relax(); solve(UEqn() == fvc::grad(p)alpha);//sourceterm with alpha and U (velocity of flow) are vector/volVectorFields. My goal is to solve the sourceterm alpha implicity and tried with tmp<fvvectormatrix> UEqn ( fvm::div(phi, U) + turbulence>divR(U) + fvm::Sp(alpha / U, U) // implicit sourceterm ); UEqn().relax(); solve(UEqn() == fvc::grad(p)); But i get an error like FOAM FATAL ERROR : incompatible fields for operation [U] + [alpha]#0 Foam::error::printStack(Foam::Ostream&) in "/users/studi8/OpenFOAM/OpenFOAM1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" Have someone any idea, how to solve these problem implicity anyway? Regards, Khaled 

March 11, 2009, 07:39 
problem:
dU/dt = U + a
exp

#2 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21 
problem:
dU/dt = U + a explicit: (U^n  U^(n1)/dt = U^(n1) + a implicit: (U^n  U^(n1)/dt = U^n + a explicit/implicit has nothing to do with the evaluation of a here, only with how U is evaluated. So your question doesnt make any sense. ...unless a really is a = a(U) but thats not obvious from your question. if the influence of a is big there is a common linearizing 'cheat' that goes something like this: dU/dt = U + a*1 = U + a*(U/U) discretized as: (U^n  U^(n1)/dt = U^(n1) + a*(U^n/U^(n1)) 

March 12, 2009, 03:16 
...interrupted...continuing:

#3 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21 
...interrupted...continuing:
however if a and U is a vector you will have a/U (vector/vector = ?) further (a/U)*U should still be a vector so (a/U) should either be a scalar or a matrix and in your case it is probably a matrix, so you have to construct this matrix, which is probably diagonal and a_i/U_i. And as far as I know there is no implementation of implicit treatment of fvm::Sp(<tensorfield>, <vectorfield>) 

March 12, 2009, 04:17 
Hi Niklas,
it seems so. Itī

#4 
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 9 
Hi Niklas,
it seems so. Itīs a pity. I try it explicit like tmp<fvvectormatrix> UEqn ( fvm::div(phi, U) + turbulence>divR(U) ); UEqn().relax(); solve(UEqn() == fvc::grad(p)alpha);//sourceterm Thanks, Khaled 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problems with the RSM in simpleFoam  sberg  OpenFOAM Running, Solving & CFD  10  February 25, 2014 20:39 
What is phi in simpleFoam  ehsan_vaghefi  OpenFOAM Running, Solving & CFD  7  September 29, 2013 11:00 
NACA0012 with simpleFOAM  nuovodna  OpenFOAM Running, Solving & CFD  7  May 19, 2010 04:58 
SimpleFoam error  sven82  OpenFOAM Running, Solving & CFD  0  October 16, 2008 04:13 
Using simpleFoam with water  nico765  OpenFOAM Running, Solving & CFD  7  October 23, 2007 05:39 