# How to solve in simpleFoam with a volumesourceterm implicity

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

 March 11, 2009, 06:44 Hey openFoam experts, i wan #1 Member   Join Date: Mar 2009 Posts: 35 Rep Power: 8 Hey openFoam experts, i want to solve the following in openfoam navier-stokes-equation like in simpleFoam, tmp 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 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/OpenFOAM-1.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: 19 problem: dU/dt = U + a explicit: (U^n - U^(n-1)/dt = U^(n-1) + a implicit: (U^n - U^(n-1)/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^(n-1)/dt = U^(n-1) + a*(U^n/U^(n-1))

 March 12, 2009, 03:16 ...interrupted...continuing: #3 Super Moderator     Niklas Nordin Join Date: Mar 2009 Location: Stockholm, Sweden Posts: 693 Rep Power: 19 ...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(, )

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

 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 sberg OpenFOAM Running, Solving & CFD 10 February 25, 2014 20:39 ehsan_vaghefi OpenFOAM Running, Solving & CFD 7 September 29, 2013 11:00 nuovodna OpenFOAM Running, Solving & CFD 7 May 19, 2010 04:58 sven82 OpenFOAM Running, Solving & CFD 0 October 16, 2008 04:13 nico765 OpenFOAM Running, Solving & CFD 7 October 23, 2007 05:39

All times are GMT -4. The time now is 13:21.