# Error in solving bdivbFunction

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

 June 22, 2007, 05:20 Hi All! I'm new at OpenFOAM. #1 New Member   Bettina Kemper Join Date: Mar 2009 Location: Germany Posts: 1 Rep Power: 0 Sponsored Links Hi All! I'm new at OpenFOAM. I try to solve the dimensionless Poisson-Equation. First I tried: solve( Gamma*(fvm::div(diag(fvc::grad(Phin)*Vektor))))+fv m::div(diag(fvc::grad(Pha)*Vek tor))==-Psi*(C1*z1+C2*z2) ); This didn't work because the 'diag'-Function ist not available.(I found information about that in the forum: Thanks). By the way, Vektor=(1 0 1/eq), where eq is a constant value. So, I splitted the equation and defined volTensorFields: volTensorField T1=(fvc::grad(Phin))*Vektor; volTensorField T2=(fvc::grad(Pha))*Vektor; To get a vector of the diagonal components I used the .component-Function.(Thanks again to the Forum.) Term1.component(vector::X)=T1.component(tensor::XX ); Term1.component(vector::Y)=T1.component(tensor::YY ); Term1.component(vector::Z)=T1.component(tensor::ZZ ); Same procedure for Term2 from T2. Then I defined volVectorField a=Term1; volVectorField b=Term2; Then I tried to solve the equation solve( Gamma*fvm::div(a)+fvm::div(b)==-Psi*(C1*z1+C2*z2) ); This produced: error:no matching function for call to 'div(Foam::volVectorField&)' With 'fvc' instead of 'fvm' it is: error:no match for 'operator=='in Foam::operator+(... Sorry, for the long explanation. Has anybody an idea what's wrong and how to solve this? I would be greatful for help. Bettina

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post kar OpenFOAM Running, Solving & CFD 2 April 30, 2008 15:15 Praveenreddy FLUENT 0 December 6, 2007 21:44 field Main CFD Forum 0 September 10, 2007 23:08 Chris Wood Siemens 1 October 25, 2004 06:36 Tiefeng WANG CFX 2 June 14, 2002 09:07