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

BC evaluation by means of external lists allocated in the solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 18, 2007, 07:09
Default Hi all, I have to work simu
  #1
New Member
 
Miriam
Join Date: Mar 2009
Posts: 15
Rep Power: 7
shrina is on a distinguished road
Hi all,

I have to work simultaneously on different meshes and their relative geometricfieds, and the BC for a field on certain patches are calculated by means of of another geometricfield (relative to a different mesh), evaluated at each iteration in the solver.
Three of the meshes represent three distinct regions of a physical domain, and this method is used to determine the boundary conditions at the interfaces between the three contiguous regions : each interface is splitted into two distinct patches, each belonging to one of the two confining meshes, and the continuity of the physical quantity at the interface is imposed by imposing the equality of the two fieds on the two distict patches (each relative to a distict mesh) and in a similar way the equality of the fluxes at the interface (an iterative method is used).
Other meshes instead represent non physical regions, since I have to implement population balances.

My question is: is there a specific class that allows to evaluate and update the BC of a geometric field by using one or more scalarLists evaluated at each iteration in the solver (determined by means of other geometricfields evaluated in the solver and relative to different meshes)?

I tried to define specific classes, inheriting from the class fvPatchField to accomplish that: for example externalListFvPatchField, extGradFvPatchFiled.
I added to the GeometricBoundaryField class data members that are pointers to external lists allocated in the solver.
In these lists the values determined by means of other geometricfields, defined on different meshes and that must be assigned to the patchfiled, or that are used to evaluate the patchfield (if a gradient is imposed) are stored; in one of these lists the names of the patches that must be determined in this way are stored.
I then overloaded the fvPatchField::New function, adding protypes and relative definitions that have these additional input parameters, that are then passed to the constructor of the new classes (externalListFvPatchField, extGradFvPatch).
These data about external lists are data members of these new classes, they are not added to the superclass fvPatchField.
I defined these classes, I added them to the basic fvPatchField folder, I added them in the Make/files, I tried to compile the finiteVolume library, but it gave me the following compilation error:


//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////
Make/linuxGcc4DPDebug/externalListFvPatchField.o
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 68: error: redefinition of 'Foam::externalListFvPatchField<type>::externalLis tFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, Foam::label, Foam::wordList*, Foam::labelList*, Foam::scalarList***)'
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 68: error: 'Foam::externalListFvPatchField<type>::externalLis tFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, Foam::label, Foam::wordList*, Foam::labelList*, Foam::scalarList***)' previously declared here
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 117: error: redefinition of 'Foam::externalListFvPatchField<type>::externalLis tFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&, Foam::label, Foam::wordList*, Foam::labelList*, Foam::scalarList***)'
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 117: error: 'Foam::externalListFvPatchField<type>::externalLis tFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&, Foam::label, Foam::wordList*, Foam::labelList*, Foam::scalarList***)' previously declared here
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 136: error: redefinition of 'Foam::externalListFvPatchField<type>::externalLis tFvPatchField(const Foam::externalListFvPatchField<type>&, const Foam::Field<type>&)'
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 136: error: 'Foam::externalListFvPatchField<type>::externalLis tFvPatchField(const Foam::externalListFvPatchField<type>&, const Foam::Field<type>&)' previously declared here
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 179: error: redefinition of 'void Foam::externalListFvPatchField<type>::evaluate()'
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 179: error: 'virtual void Foam::externalListFvPatchField<type>::evaluate()' previously declared here
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 249: error: redefinition of 'Foam::tmp<foam::field<type> > Foam::externalListFvPatchField<type>::valueInterna lCoeffs(const Foam::tmp<foam::field<double> >&) const'
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 249: error: 'virtual Foam::tmp<foam::field<type> > Foam::externalListFvPatchField<type>::valueInterna lCoeffs(const Foam::tmp<foam::field<double> >&) const' previously declared here
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 260: error: redefinition of 'Foam::tmp<foam::field<type> > Foam::externalListFvPatchField<type>::valueBoundar yCoeffs(const Foam::tmp<foam::field<double> >&) const'
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 260: error: 'virtual Foam::tmp<foam::field<type> > Foam::externalListFvPatchField<type>::valueBoundar yCoeffs(const Foam::tmp<foam::field<double> >&) const' previously declared here
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 269: error: redefinition of 'Foam::tmp<foam::field<type> > Foam::externalListFvPatchField<type>::gradientInte rnalCoeffs() const'
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 269: error: 'virtual Foam::tmp<foam::field<type> > Foam::externalListFvPatchField<type>::gradientInte rnalCoeffs() const' previously declared here
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 278: error: redefinition of 'Foam::tmp<foam::field<type> > Foam::externalListFvPatchField<type>::gradientBoun daryCoeffs() const'
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 278: error: 'virtual Foam::tmp<foam::field<type> > Foam::externalListFvPatchField<type>::gradientBoun daryCoeffs() const' previously declared here
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 286: error: redefinition of 'void Foam::externalListFvPatchField<type>::write(Foam:stream&) const'
fields/fvPatchFields/basicFvPatchFields/externalList/externalListFvPatchField.C: 286: error: 'virtual void Foam::externalListFvPatchField<type>::write(Foam:stream&) const' previously declared here
make: *** [Make/linuxGcc4DPDebug/externalListFvPatchField.o] Error 1
miriam@ACERM:~/OpenFOAM/OpenFOAM-1.3-debug/src/finiteVolume>
//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////


I cannot understand where the problem is.
I suppose that I also have to overload the function declareRunTimeSelectionTable by considering the new input parameters, but I do not know how.
Please, could anyone help me!


Thanks a lot in advance

P.S. What should I do to attach here the folder with my files?
shrina is offline   Reply With Quote

Old   January 18, 2007, 11:48
Default Hi, these are the files I ha
  #2
New Member
 
Miriam
Join Date: Mar 2009
Posts: 15
Rep Power: 7
shrina is on a distinguished road
Hi,
these are the files I have talked about.

{FilesMiriam.zip}

Bye

Miriam
shrina is offline   Reply With Quote

Old   January 18, 2007, 12:29
Default Sorry, I have not attached the
  #3
New Member
 
Miriam
Join Date: Mar 2009
Posts: 15
Rep Power: 7
shrina is on a distinguished road
Sorry, I have not attached the folder correctly.
I try again

FilesMiriam.tar.gz

Bye

Miriam
shrina is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solver for compressible external flow ryan_m OpenFOAM Running, Solving & CFD 3 April 7, 2008 09:18
*** INSUFFICIENT MEMORY ALLOCATED *** ?????? Pedro lima CFX 5 September 26, 2007 09:28
Generation of lists for Patch stephan OpenFOAM 1 August 17, 2007 06:08
INSUFFICIENT MEMORY ALLOCATED Virag Mishra CFX 2 May 14, 2007 11:02
External Flow-compressible flow solver-lift/drag Tom Brown Main CFD Forum 7 December 29, 2000 14:41


All times are GMT -4. The time now is 17:28.