|
[Sponsors] |
April 29, 2010, 12:46 |
Solve dS_dt + div(vect(U)*f(S))=q
|
#1 |
New Member
andres
Join Date: Aug 2009
Posts: 15
Rep Power: 17 |
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, 02:08 |
|
#2 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
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 (current status: http://albertopassalacqua.com/?p=1541) 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, 04:44 |
Impementaiton
|
#3 |
New Member
andres
Join Date: Aug 2009
Posts: 15
Rep Power: 17 |
Hi Alberto,
I hope that the problem declaration this time is more illustrating. Implementation: The initial values of Code:
volScalarField S volVectorField U Code:
dimensionedScalar const1 dimensionedScalar const2 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<Type>::valueInternalCoeffs(const tmp<scalarField>&) const in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 145. Thanks Andres |
|
April 30, 2010, 04:57 |
|
#4 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
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? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Linearized NS euqations: how to solve them?(problem with Matrix operations..) | matteoL | OpenFOAM Running, Solving & CFD | 0 | November 18, 2009 07:58 |
Using Compressible Solver (sonicFoam) to solve subsonic flows | ezsoal | OpenFOAM | 0 | October 27, 2009 10:13 |
Solve for two or more "Temperatures" | Rui | CFX | 12 | September 9, 2008 22:58 |
MAC method solve for pressure at boundry | Ron | Main CFD Forum | 2 | January 28, 2006 03:14 |
How to solve another continuum and momentum eqn? | west_wing | FLUENT | 0 | August 25, 2003 11:00 |