# Solve dS_dt + div(vect(U)*f(S))=q

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

 April 29, 2010, 11:46 Solve dS_dt + div(vect(U)*f(S))=q #1 New Member   andres Join Date: Aug 2009 Posts: 15 Rep Power: 9 Hi I am trying to solve this equation in openfoam. dS_dt + div(vect(U)*f(S))=q where f(S) is a known equation dependent of S. S cannot be explicitly extracted from f(S). up to now if I implement the equation as stated above I get an error concerning calculatedFvPatchField. Has anybody had similar problems? Thanks Andres

 April 30, 2010, 01:08 #2 Senior Member   Alberto Passalacqua Join Date: Mar 2009 Location: Ames, Iowa, United States Posts: 1,910 Rep Power: 27 A bit vague :-) You should give some more detail on how the equation was implemented, and be specific with the error message. 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.

 April 30, 2010, 03:44 Impementaiton #3 New Member   andres Join Date: Aug 2009 Posts: 15 Rep Power: 9 Hi Alberto, I hope that the problem declaration this time is more illustrating. Implementation: The initial values of Code: ```volScalarField S volVectorField U``` are read from the case directory 0 and Code: ```dimensionedScalar const1 dimensionedScalar const2``` from the constant directory. The implementation reads Code: ``` volScalarField X = (S-const1)/(const2); f = pow(X,2)/(2*pow(X,2)-2*X-1); phi = linearInterpolate(U) & mesh.Sf(); fvScalarMatrix SEqn ( por*fvm::ddt(S) + fvm::div(phi,f) == q ); solve(SEqn);``` Code: ```Error: --> FOAM FATAL ERROR: valueInternalCoeffs cannot be called for a calculatedFvPatchField on patch fixedWalls of field f in file "/home/i/andres/Simulations/FOAM/darcy2/0/f" You are probably trying to solve for a field with a default boundary condition. From function calculatedFvPatchField::valueInternalCoeffs(const tmp&) const in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 145.``` I am no very sure what this means. Do I need to create my own boundary condition to fulfill this? or can I define my equation in another way ? Thanks Andres

 April 30, 2010, 03:57 #4 Super Moderator     Niklas Nordin Join Date: Mar 2009 Location: Stockholm, Sweden Posts: 693 Rep Power: 21 try to replace fvm::div(phi,f) with fvc::div(phi,f) You cant solve implicitly for both f and S, they arent really the same fields are they?

 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 matteoL OpenFOAM Running, Solving & CFD 0 November 18, 2009 07:58 ezsoal OpenFOAM 0 October 27, 2009 10:13 Rui CFX 12 September 9, 2008 21:58 Ron Main CFD Forum 2 January 28, 2006 03:14 west_wing FLUENT 0 August 25, 2003 10:00

All times are GMT -4. The time now is 10:34.