Friday, 27 July 2012

home reading

http://27bslash6.com/monkey.html
http://www.amazon.com/gp/product/B001SRFW3Y?ie=UTF8&tag=ubersite&linkCode=as2&camp=1789&creative=9325&creativeASIN=B001SRFW3Y

Sunday, 1 July 2012

0/files

From http://www.cfd-online.com/Forums/openfoam/90301-interfoam-simulation-blowing-up-2.html

0/epsilon:


boundaryField {
    inlet   {  type  fixedValue;  value           uniform 0.0000824; }
    outlet  type  inletOutlet;   inletValue      uniform 0.0000824; value uniform 0.0000824; }
    upperwall  { type inletOutlet; inletValue  uniform 0.0000824;  value  uniform 0.0000824; }
    walls type epsilonWallFunction; value  uniform 0.0000824; }
    frontAndBackPlanes type            empty; }
    }

0/k:

boundaryField {
    inlet  { type            fixedValue;  value           uniform 0.000384; }
    outlet {  type            inletOutlet;   inletValue      uniform 0.000384;  value           uniform 0.000384; }
    upperwall {  type  inletOutlet; inletValue      uniform 0.000384; value           uniform 0.000384; }
    walls type kqRWallFunction; value  uniform 0.000384; }
    frontAndBackPlanes  type empty; }
    }

0/nut:

boundaryField {
    inlet { type            calculated;  value           uniform 0; }
    outlet  { type            inletOutlet; inletValue      uniform 0; value           uniform 0; }
    upperwall { type            inletOutlet; inletValue      uniform 0; value           uniform 0; }
    walls { type  nutUWallFunction; value           uniform 0;}
    frontAndBackPlanes { type            empty; }
    }

0/nuTilda:

boundaryField {
    inlet  {  type    fixedValue; value           uniform 0;}
    outlet   type   inletOutlet;  inletValue      uniform 0; value           uniform 0;  }
    upperwall  {  type            inletOutlet; inletValue      uniform 0; value           uniform 0; }
    walls { type            zeroGradient; }   
    frontAndBackPlanes   type   empty; }
    }

0/U:

boundaryField {
    walls  { type            fixedValue;  value           uniform (0 0 0); }
    baffle  { type            fixedValue;  value           uniform (0 0 0);    }
    inlet   {  type            fixedValue;  value           uniform (0.16 0 0);  }
    outlet  {  type            inletOutlet;  inletValue      uniform (0 0 0);  value           uniform (0 0 0); }
    upperwall {  type            pressureInletOutletVelocity;  value           uniform (0 0 0);
    // type  zeroGradient;
    }
    defaultFaces { type            empty; }
    }


0/p_rgh:

boundaryField {
    walls { type            zeroGradient; //buoyantPressure;
        //value           uniform 0;
      }
    baffle  { type            zeroGradient;  //value           uniform 0;
    }
    inlet  { type            zeroGradient;  }
   outlet  {
        type            totalPressure;//zeroGradient;
        p0              uniform 0;
        U               U;
        phi             phi;
        rho             rho;
        psi             none;
        gamma           1;
        value           uniform 0; }
    upperwall {
        type            totalPressure;//zeroGradient;
        p0              uniform 0;
        U               U;
        phi             phi;
        rho             rho;
        psi             none;
        gamma           1;
        value           uniform 0; }
    defaultFaces { type            empty;}
    }


p_rgh: all wall and inlet should be " buoyantPressure", not zeroGradient.


outlet should not be a totalPressure like your upperwall (not consistent), but try zeroGradient here. But if your upperwall is a wall, then -> buoyantPressure, and outlet: totalPressure.

k,epsilon: try zeroGradient for the upperwall (if this is a free atmosphere. In case this is a wall, then ok)

nut: wall = nut wall function ok, all other (inlet/outlet/top: calculated).







Saturday, 23 June 2012

chroot jail with ssh

from https://help.ubuntu.com/community/BasicChroot
make the chroot structure somewhere.  




$ sudo debootstrap --variant=buildd --arch amd64 precise /home/me/chroot/ http://ubuntu.virginmedia.com/archive/

Then, follow http://forums.gentoo.org/viewtopic-t-374757.html

sudo apt-get install libpam-chroot

sudo vi /etc/security/chroot.conf.  Add user and chroot directory created above, for example,

# to make user `chrooted' get sent to jail in /home/me/chroots/chroot1
chrooted /home/me/chroots/chroot1  

When `chrooted' logs in they will be jailed as above.

sudo vi /etc/pam.d/login.  Add,

# I added the following from 
# http://forums.gentoo.org/viewtopic-t-374757.html
# to turn on PAM chroot jail logins
# /etc/security/chroot.conf, etc/pam.d/login, /etc/pam.d/su also need editing.
session required /lib/security/pam_chroot.so debug

Now,

sudo vi /etc/pam.d/su

#add this line: 
session    required             pam_chroot.so debug




This doesn't work.  :(  The jailed user on login can navigate up above the new home.

There's a program called, `makejail'.  Install it.  Try it.


Or try 
http://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny


Thursday, 21 June 2012

system/fvSchemes: ok but epsilon blows slowly.


FoamFile{version 2.0; format ascii; class dictionary; location "system"; object fvSchemes;}

snGradSchemes {
    default         limited 0.7;  // limited 0.7; for bad meshes;
                                // corrected; for good meshes;
                                // must fit to laplacianSchemes
    }

laplacianSchemes {default none;
   //laplacian(nuEff,U) Gauss linear corrected;          // for good meshes
   laplacian(nuEff,U) Gauss linear limited 0.7;      // for bad meshes

    //laplacian((1|A(U)),p) Gauss linear corrected;      // for good meshes
    laplacian((1|A(U)),p) Gauss linear limited 0.7;  // for bad meshes
//  for turbulent flow only:
//    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
    laplacian(DREff,R) Gauss linear corrected;
//    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; // SA only
}

fluxRequired {
    default         no;
    p              ;
    phi             ;
    }

gradSchemes { // Gradient calculation.  Gauss linear first, cell Limited Gauss linear 1; for better stability with poor meshes.
    default  Gauss linear;  // Gauss linear or leastSquares
    grad(p)         faceLimited leastSquares 0 1;  
    grad(U)         Gauss linear;              
    }

interpolationSchemes {default  linear;     // linear is fine
   U               linear;
//   interpolate(U) reconCentral phi cellLimited leastSquare 1.0; // new tet mesh interpolator. Use with reconCentral in divSchemes
}

divSchemes {default none; div(phi,U)      Gauss upwind;               // stable: Gauss upwind
//div(phi,U)      Gauss linearUpwind Gauss; // faster linearUpwind Gauss
//    div(phi,U)      Gauss reconCentral cellLimited leastSquares 1.0;    // new, tets mesh setting
//    div(phi,k)      Gauss upwind;             // for turbulent flow only
    div(phi,epsilon) Gauss upwind;            // for turbulent flow only
    div(phi,R)      Gauss upwind;             // for turbulent flow only
    div(R)          Gauss linear;             // for turbulent flow only
//    div(phi,nuTilda) Gauss upwind;            // for turbulent SA flow only
div((nuEff*dev(grad(U).T()))) Gauss upwind; // this scheme is not used for
//div((nuEff*dev(grad(U).T()))) Gauss linear; // this scheme is not used for
                                                // steady and laminar flow, but
                                                // it is read by the solver, so
                                                // it must be defined.
//div((nuEff*dev(T(grad(U))))) Gauss linear; // not advised, taken from motorbike case
div((nuEff*dev(T(grad(U))))) Gauss upwind; // not advised, taken from motorbike case
}

ddtSchemes {default steadyState;}    // no time dependence her

Wednesday, 20 June 2012

reconstructPar then remove

i=`ls processor0`; reconstructPar; for j in $i; do rm -r proc*/$j; done

circular cylinder / sphere analysis with recommendations.

http://www.cfd-online.com/Forums/openfoam-solving/59413-recommended-setup-flow-over-cylinder.html

parallel loading paraView for openFoam

http://www.openfoamwiki.net/index.php/Contrib_Parallelized_Native_OpenFOAM_Reader_for_ParaView