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

activating field Averages

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2010, 03:49
Question activating field Averages
  #1
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
Hello all

there are some field averaging subroutines for example on MDTOOLS on
src/lagrangian/molecularDynamics/molecule/mdTools
which are not in effect in the tutorial files and i found no clue who to make them work. has anyone got any idea what to do?

thanks in advance.
m.maneshi is offline   Reply With Quote

Old   August 27, 2010, 04:15
Default
  #2
Member
 
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 17
Erik is on a distinguished road
Hello Mehdi,

To get the field averaging working I included the following header files in the main solver file i.e. mdFoam.C:

# include "createMDFields.H"
# include "calculateMDFields.H"
# include "averageMDFields.H"
# include "resetMDFields.H"

in the following places:


#include "fvCFD.H"
#include "md.H"

int main(int argc, char *argv[])
{

# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"

potential pot(mesh);

moleculeCloud molecules(mesh, pot);

# include "temperatureAndPressureVariables.H"

label nAveragingSteps = 0;

# include "createMDFields.H"

Info << "\nStarting time loop\n" << endl;

while (runTime.loop())
{

nAveragingSteps++;

Info << "Time = " << runTime.timeName() << endl;

molecules.evolve();

# include "meanMomentumEnergyAndNMols.H"

# include "temperatureAndPressure.H"

# include "calculateMDFields.H"
# include "averageMDFields.H"
# include "resetMDFields.H"

runTime.write();

if (runTime.outputTime())
{
nAveragingSteps = 0;
}

Info << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}

Info << "End\n" << endl;

return 0;
}

Cheers,
Erik
Erik is offline   Reply With Quote

Old   August 27, 2010, 04:40
Default
  #3
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
Thanks alot . i will test it ASAP.
m.maneshi is offline   Reply With Quote

Old   August 27, 2010, 09:26
Default
  #4
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
Did so and all seems to be going all well , isn't there any need to call the functions in the Control Dict or any other places ? why isnt there any new variables added to data like Density , bulk velocity and so forth ?? plus is it needed to re make the edited solver file ? Can the averaging parameters such as bin sizes and so on be changed for a run ?
m.maneshi is offline   Reply With Quote

Old   August 28, 2010, 12:38
Default
  #5
Member
 
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 17
Erik is on a distinguished road
HI Mehdi,

After you added these lines did you compile the solver by running "wclean" and then "wmake" in the same folder as you have the Make directory. This needs to be done in order for any changes to be made. If this does not work then maybe you need to compile the molecule library as well by running "wclean libso" and then "wmake libso".

cheers,
Erik
Erik is offline   Reply With Quote

Old   August 28, 2010, 14:20
Default
  #6
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
i did the wclean libso and wmake libso after wards in the folder relating to mdfoam.c and here is the result :
HTML Code:
cd /home/mehdi/OpenFOAM/OpenFOAM-1.6/applications/solvers/discreteMethods/molecularDynamics/mdFoam/
mehdi@mehdi-laptop:~/OpenFOAM/OpenFOAM-1.6/applications/solvers/discreteMethods/molecularDynamics/mdFoam$ wclean libso
wclean ./
mehdi@mehdi-laptop:~/OpenFOAM/OpenFOAM-1.6/applications/solvers/discreteMethods/molecularDynamics/mdFoam$ wmake libso
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file mdFoam.C
SOURCE=mdFoam.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/potential/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecularMeasurements/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/basic/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linuxGccDPOpt/mdFoam.o
In file included from mdFoam.C:50:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H: In function ‘int main(int, char**)’:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:5: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:11: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:17: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:23: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:37: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:43: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:52: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:92: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:98: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:107: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:147: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:153: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:162: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:221: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:227: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:236: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:277: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:283: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:292: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
In file included from mdFoam.C:67:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/calculateMDFields.H:13: error: ‘class Foam::molecule’ has no member named ‘U’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/calculateMDFields.H:17: error: ‘class Foam::molecule’ has no member named ‘mass’
In file included from mdFoam.C:69:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/resetMDFields.H:5: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/resetMDFields.H:11: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/resetMDFields.H:17: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/resetMDFields.H:23: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
make: *** [Make/linuxGccDPOpt/mdFoam.o] Error 1
what point am i missing already ?
m.maneshi is offline   Reply With Quote

Old   August 28, 2010, 14:28
Default
  #7
Member
 
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 17
Erik is on a distinguished road
in the folder of mdFoam.C you should only type "wclean" and then "wmake" the commands "wclean libso" and "wmake libso" should only be used in case you are compiling a library e.g. the molecule library.
Erik is offline   Reply With Quote

Old   August 28, 2010, 14:39
Default
  #8
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
ok did that in the mdfoam directory and here is the result :
HTML Code:
mehdi@mehdi-laptop:~/OpenFOAM/OpenFOAM-1.6/applications/solvers/discreteMethods/molecularDynamics/mdFoam$ wclean
mehdi@mehdi-laptop:~/OpenFOAM/OpenFOAM-1.6/applications/solvers/discreteMethods/molecularDynamics/mdFoam$ wmake
Making dependency list for source file mdFoam.C
SOURCE=mdFoam.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/potential/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecularMeasurements/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/basic/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linuxGccDPOpt/mdFoam.o
In file included from mdFoam.C:50:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H: In function ‘int main(int, char**)’:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:5: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:11: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:17: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:23: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:37: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:43: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:52: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:92: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:98: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:107: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:147: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:153: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:162: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:221: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:227: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:236: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:277: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:283: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/createMDFields.H:292: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
In file included from mdFoam.C:67:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/calculateMDFields.H:13: error: ‘class Foam::molecule’ has no member named ‘U’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/calculateMDFields.H:17: error: ‘class Foam::molecule’ has no member named ‘mass’
In file included from mdFoam.C:69:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/resetMDFields.H:5: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/resetMDFields.H:11: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/resetMDFields.H:17: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/resetMDFields.H:23: error: ‘class Foam::moleculeCloud’ has no member named ‘potential’
make: *** [Make/linuxGccDPOpt/mdFoam.o] Error 1
seems there is a problem with moleculeCloud ??
m.maneshi is offline   Reply With Quote

Old   August 28, 2010, 14:58
Default
  #9
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
there seems nothing especial happens after compiling the solver and library and when i run the mdFoam for my problem there goes the same as before and no averaging or volume field or etc is calculated
m.maneshi is offline   Reply With Quote

Old   August 28, 2010, 16:06
Default
  #10
Member
 
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 17
Erik is on a distinguished road
Ok, sorry I forgot that some changes need to be made to the molecule library. You therefore need to go to the directory:
$(LIB_SRC)/lagrangian/molecularDynamics/molecule

and do the following changes:

in createMDfields.H and resetMDfields.H you need to search and replace potential() with pot().

in calculateMDfields.H the representation of velocity U is now represented by v and the mass is no longer a molecular attribute but a property defined in the molecularPropertiesDict:
therefore, in the same file, you need to replace:
allSpeciesM_RU[molId][cell] += mol->mass();

with the two lines:

const molecule::constantProperties& constProp = molecules.constProps(molId);
allSpeciesM_RU[molId][cell] += constProp.mass();

After this you get to use commands "wclean libso" and then "wmake libso" to compile the library. Then navigate to the directory of the solver and compile using wclean and wmake.

It is neater however if you copy the solver and and molecule directories to your user folder and make the changes there. That way you preserve the original OF the default way. For this later issue I would consult the userguide.

good luck,
Erik
Erik is offline   Reply With Quote

Old   August 29, 2010, 12:03
Default
  #11
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
Quote:

in calculateMDfields.H the representation of velocity U is now represented by v and the mass is no longer a molecular attribute but a property defined in the molecularPropertiesDict:
therefore, in the same file, you need to replace:
allSpeciesM_RU[molId][cell] += mol->mass();

with the two lines:

const molecule::constantProperties& constProp = molecules.constProps(molId);
allSpeciesM_RU[molId][cell] += constProp.mass();
did so but the U as you siad is still a problem

HTML Code:
In file included from mdFoam.C:67:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/calculateMDFields.H: In function ‘int main(int, char**)’:
/home/mehdi/OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule/lnInclude/calculateMDFields.H:13: error: ‘class Foam::molecule’ has no member named ‘U’
make: *** [Make/linuxGccDPOpt/mdFoam.o] Error 1
have you got any ideas ?
m.maneshi is offline   Reply With Quote

Old   August 29, 2010, 13:08
Default
  #12
Member
 
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 17
Erik is on a distinguished road
Hi,

The error message that you show says that U is unknown still. So you should replace U with v.
Erik is offline   Reply With Quote

Old   August 29, 2010, 13:23
Default
  #13
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
hi , thanks for your replies.

so i did the replacement

the calculateMDFiels.H now is like this
HTML Code:
const List<DynamicList<molecule*> >& cellOccupancy = molecules.cellOccupancy();

forAll(cellOccupancy, cell)
{
    const List<molecule*>& molsInCell = cellOccupancy[cell];

    forAll(molsInCell, mIC)
    {
        molecule* mol = molsInCell[mIC];

        const label molId = mol->id();

        const vector& molU = mol->v();

        allSpeciesN_RU[molId][cell]++;

        const molecule::constantProperties& constProp = molecules.constProps(molId);

    allSpeciesM_RU[molId][cell] += constProp.mass();

        allSpeciesVelocitySum_RU[molId][cell] += molU;

        allSpeciesVelocityMagSquaredSum_RU[molId][cell] += molU & molU;
    }
}
is it all right ? or molU and others shall be like molv and so forth ? are the replacements limited to this header file only ?
m.maneshi is offline   Reply With Quote

Old   August 29, 2010, 13:55
Default
  #14
Member
 
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 17
Erik is on a distinguished road
No worries,

It should work now. molU can remain molU since it is declared and used locally.
Erik is offline   Reply With Quote

Old   August 29, 2010, 14:08
Default
  #15
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
so as i perform wclean and subsequently wmake here is the result
HTML Code:
/usr/lib/crt1.o: In function `_start':
/build/buildd/glibc-2.9/csu/../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1
m.maneshi is offline   Reply With Quote

Old   August 29, 2010, 14:44
Default
  #16
Member
 
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 17
Erik is on a distinguished road
I think you are trying to use wclean and wmake commands for compiling the molecule class. This does not work since it does not have main in it. The molecule class should be compiled using wclean libso and then wmake libso. Then navigate to the solver and use the wclean and wmake commands.
Erik is offline   Reply With Quote

Old   August 29, 2010, 17:03
Default
  #17
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
Thanks alot. it finally solve the problem. just one other question to ask . is it possible to change the binning size for the calculation of average values ?
m.maneshi is offline   Reply With Quote

Old   August 29, 2010, 17:37
Default
  #18
Member
 
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 17
Erik is on a distinguished road
No problem. The averaging is done cell wise so these bins sizes are determined from the blockMeshDict file.
Erik is offline   Reply With Quote

Old   September 8, 2010, 14:29
Default
  #19
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 17
m.maneshi is on a distinguished road
followed your leads and all seems to work fine . there remains but two questions of you could help i would be most grateful.

First of all when modeling a simple nano pressure driven channel with a gravity like .5 along the channel and periodic inlet / outlet the simulation never reaches a steady state even after 5*10^-11 seconds. why is it so ?

Second is that averages Calculated for run are very mesh size dependent as anticipated but there seems to be no appropriate mesh size to create smooth profiles for density , velocity and so forth ? what is wrong wish cell averaging ? must i resume with some other methods ?

Thanks in advance .
m.maneshi 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
Phase Field modeling in OpenFOAM adona058 OpenFOAM Running, Solving & CFD 35 November 16, 2021 01:16
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
Turbulence dampening due to magnetic field in LES and RAS eelcovv OpenFOAM 0 June 8, 2010 12:35
Zero size field taranov OpenFOAM Bugs 2 April 20, 2010 05:51
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 15:55.