CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

A stupid question

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By henry

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2005, 00:38
Default I read the solver in: (appli
  #1
Member
 
Luckyluke
Join Date: Mar 2009
Posts: 51
Rep Power: 17
luckyluke is on a distinguished road
I read the solver in:
(applications\solvers\multiphase\interFoam\).

But I can find the solve function for 'UEqn' matrix, which is defined as:
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muf, U)
- (fvc::grad(U) & fvc::grad(muf))
);

What is the matter?
luckyluke is offline   Reply With Quote

Old   April 6, 2005, 04:37
Default In the interface capturing cod
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
In the interface capturing codes the momentum equation is not solved using an implicit solver in a predictor step as in other codes, it is solved as part of the PISO corrector sequence only:

U = UEqn.H()/A;

and

U += fvc::reconstruct(phi - phiU);
U.correctBoundaryConditions();

It would be possible to include a prector step as well but experience has shown that it does not improve convergence.
pfhan likes this.
henry is offline   Reply With Quote

Old   August 4, 2005, 15:32
Default Sorry for my ignorance, but in
  #3
New Member
 
Chris Rutland
Join Date: Mar 2009
Posts: 2
Rep Power: 0
rutland is on a distinguished road
Sorry for my ignorance, but in icoFoam how is the 'solve' below a predictor if it's solution, U, is immediately overwritten by the U = UEqn.H()/A; statement?
...
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);

solve(UEqn == -fvc::grad(p));

// --- PISO loop

for (int corr=0; corr<nCorr; corr++)
{
volScalarField A = UEqn.A();

U = UEqn.H()/A;
...
rutland is offline   Reply With Quote

Old   August 4, 2005, 15:40
Default Not so stupid: UEqn.H() uses t
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Not so stupid: UEqn.H() uses the current value of U to evaluate itself and that's where the predicted value gets into the game.

Enjyoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   August 4, 2005, 16:25
Default Hey I have always had a curios
  #5
New Member
 
Michael McWilliam
Join Date: Mar 2009
Location: Waterloo, Ontario, Canada
Posts: 5
Rep Power: 17
pilot is on a distinguished road
Hey I have always had a curiosity what is the the A and H quantities?

A seems to be a per second quantity, then H is a m/s quantity that takes the velocity feild.

There is a lot of H/A wich would be acceleration. Is this used in extrapolating n+1 values or something? Just curious.

Thanks Mike
pilot is offline   Reply With Quote

Old   August 4, 2005, 16:31
Default Basically A is the diagonal of
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Basically A is the diagonal of thge matrix and H is the rest of the matrix multiplied by the field. Thus H/A is a simple point-Jacobi solution for the field.
henry is offline   Reply With Quote

Old   August 4, 2005, 16:32
Default Thanks Hrv. Michael, an exc
  #7
New Member
 
Chris Rutland
Join Date: Mar 2009
Posts: 2
Rep Power: 0
rutland is on a distinguished road
Thanks Hrv.

Michael, an excellent reference for your question and a lot of Foam related topics is Hrv's thesis at http://www.h.jasak.dial.pipex.com/
rutland is offline   Reply With Quote

Old   August 4, 2005, 16:40
Default Thanks guys I have re
  #8
New Member
 
Michael McWilliam
Join Date: Mar 2009
Location: Waterloo, Ontario, Canada
Posts: 5
Rep Power: 17
pilot is on a distinguished road
Thanks guys

I have really been enjoying this code. I am trying to understand it to the fine details. It is quite facinating. I appreciate all your patience. Hopefully eventually I can get to an understanding where I can contribute. In the mean time I am still learning.

Take Care
Mike McW
pilot is offline   Reply With Quote

Old   August 4, 2005, 18:05
Default Hi, I also have a question.
  #9
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
Hi,

I also have a question. In icoFoam what is this line for?

fvScalarMatrix::reference pRef = pEqn.setReference(pRefCell, RefValue);
billy is offline   Reply With Quote

Old   August 4, 2005, 18:11
Default Never mind. I already found it
  #10
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
Never mind. I already found it in a previous discussion.
I believe it resets the pressure at the outlet to zero or to another predefined value, right?
billy is offline   Reply With Quote

Old   August 4, 2005, 18:22
Default No, it sets the value in the c
  #11
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
No, it sets the value in the cell pRefCell to be pRefValue for cases that do not have a fixedValue pressure boundary condition.
henry is offline   Reply With Quote

Old   May 26, 2006, 10:20
Default Hello, Im looking throu the hr
  #12
newbee
Guest
 
Posts: n/a
Hello, Im looking throu the hrv thesis for more information concerning the jacobi method on A and H matrixes. Its seems as A has both diagonal and off diagonal elements but I thought that A needed to be purely diagonal for the jacobi method.

question:
Is A diagonal or doesn't it need to be diagonal for jacobi method to work?
/Erik
  Reply With Quote

Old   August 12, 2007, 06:43
Default Hi everybody I defined variab
  #13
Senior Member
 
Marhamat Zeinali
Join Date: Mar 2009
Location: Tehran, Tehran, iran
Posts: 107
Rep Power: 17
marhamat is on a distinguished road
Hi everybody
I defined variable BB(scalarField BB ;)in new.H that included in icoFoam.c.
But when i change it to(volScalarField BB ;) i get some errors.
What is the problem and How i can solve it?

Sorry for disturbing you.
Have a nice weekend
Marhamat
marhamat is offline   Reply With Quote

Old   August 13, 2007, 04:30
Default Hi , What happens when i chan
  #14
Senior Member
 
Marhamat Zeinali
Join Date: Mar 2009
Location: Tehran, Tehran, iran
Posts: 107
Rep Power: 17
marhamat is on a distinguished road
Hi ,
What happens when i change ScalarField to volScalarField ?

I recieve this error:
make: Nothing to be done for `allFiles'.
make: `Make/linuxGcc4DPOpt/dependencies' is up to date.

Making dependency list for source file icoFoam.C
SOURCE_DIR=.
SOURCE=icoFoam.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/marhamat/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/lnInclude -I/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/icoFoam.o
new.H: In function 'int main(int, char**)':
new.H:38: error: no matching function for call to 'Foam::GeometricField<double,>::GeometricField()'
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:627: note: candidates are: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<type,>&, const Foam::wordList&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:589: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<type,>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:556: note: Foam::GeometricField<type,>::GeometricField(const Foam::word&, const Foam::tmp<foam::geometricfield<type,> >&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:520: note: Foam::GeometricField<type,>::GeometricField(const Foam::word&, const Foam::GeometricField<type,>&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:485: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<type,>&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:450: note: Foam::GeometricField<type,>::GeometricField(const Foam::tmp<foam::geometricfield<type,> >&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:411: note: Foam::GeometricField<type,>::GeometricField(const Foam::GeometricField<type,>&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:368: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:279: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::Field<type>&, const Foam::PtrList<patchfield<type> >&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:246: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<type>&, const Foam::wordList&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:214: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:184: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::wordList&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:151: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
new.H:39: error: no matching function for call to 'Foam::GeometricField<double,>::GeometricField()'
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:627: note: candidates are: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<type,>&, const Foam::wordList&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:589: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<type,>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:556: note: Foam::GeometricField<type,>::GeometricField(const Foam::word&, const Foam::tmp<foam::geometricfield<type,> >&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:520: note: Foam::GeometricField<type,>::GeometricField(const Foam::word&, const Foam::GeometricField<type,>&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:485: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<type,>&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:450: note: Foam::GeometricField<type,>::GeometricField(const Foam::tmp<foam::geometricfield<type,> >&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:411: note: Foam::GeometricField<type,>::GeometricField(const Foam::GeometricField<type,>&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:368: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:279: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::Field<type>&, const Foam::PtrList<patchfield<type> >&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:246: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<type>&, const Foam::wordList&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:214: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:184: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::wordList&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/marhamat/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/GeometricField.C:151: note: Foam::GeometricField<type,>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
make: *** [Make/linuxGcc4DPOpt/icoFoam.o] Error 1

Regards
Marhamat
marhamat is offline   Reply With Quote

Old   August 13, 2007, 05:25
Default Sorry guys i had one fatal mi
  #15
Senior Member
 
Marhamat Zeinali
Join Date: Mar 2009
Location: Tehran, Tehran, iran
Posts: 107
Rep Power: 17
marhamat is on a distinguished road
Sorry guys
i had one fatal mistake.so it was an real stupid problem.:-)
Regards
Marhamat
marhamat is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] Question possible stupid about grid fabianpk OpenFOAM Meshing & Mesh Conversion 2 April 10, 2007 06:55
Perhaps a stupid question... HSeldon FLUENT 0 March 9, 2007 13:14
Stupid question Dr. Nick Main CFD Forum 0 August 5, 2006 17:31
stupid question Andrew Hayes Main CFD Forum 9 December 20, 2005 12:25
A (very, very) stupid FEM Question Carlos Main CFD Forum 2 September 21, 2002 10:31


All times are GMT -4. The time now is 01:35.