# solve equation

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

 March 19, 2011, 12:05 solve equation #1 New Member   Join Date: Mar 2011 Posts: 2 Rep Power: 0 Sponsored Links Hello everyone I would like to solve a equation that looks like this: ddt(f) + div(F) = k*laplacian(f) f is a volScalarField F is a volVectorField and function of f k is a scalar How can I solve this in openFoam? Is it like this? fvScalarMatrix feqn ( fvm::ddt(f) +fvm::div(F) -k*fvm::laplacian(f) ); solve feqn; Thanks!

 March 19, 2011, 15:05 #2 Senior Member   Bernhard Join Date: Sep 2009 Location: Delft Posts: 790 Rep Power: 14 Did you try it like this? You can just compile your solver, which then gives you at an error at solve feqn; Afaik it should be solve(feqn); or feqn.solve().

 March 20, 2011, 15:26 #3 Senior Member   Alberto Passalacqua Join Date: Mar 2009 Location: Ames, Iowa, United States Posts: 1,910 Rep Power: 28 I think you have to write the divergence term as: fvm::div(F1, f) where F = F1*f Best, __________________ Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.

 March 23, 2011, 10:25 #4 New Member   Join Date: Mar 2011 Posts: 2 Rep Power: 0 Thank you for your replies! "solve feqn" should be "feqn.solve()" of course, you are right . But actually I don't get to solve anything yet. I'm still stuck at the div part. I tried fvm::div(F1,f), but I get the error no matching function for call to ‘div(Foam::volVectorField&, Foam::volScalarField&)’ Should it maybe be fvc::div?

 March 24, 2011, 06:35 #5 Senior Member   Alberto Passalacqua Join Date: Mar 2009 Location: Ames, Iowa, United States Posts: 1,910 Rep Power: 28 Sorry, I missed the fact F was a volVectorField. If you can assume F lagged, you can use fvc::div(F), which discretises it explicitly. __________________ Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.

 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 dut_thinker FLOW-3D 2 September 2, 2010 22:17 Se-Hee CFX 0 December 27, 2007 02:00 Anil CFX 8 September 25, 2007 12:57 Tomik FLUENT 1 January 8, 2006 07:18 sreenivas CFX 0 May 14, 2004 09:35