Wednesday, 15 September 2010

openFoam notes

http://www.cfd-online.com/Forums/openfoam/76246-explanation-bounding-k-bounding-epsilon.html

// source in k or epsilon equations have this:
rho_*epsilon_/k_

// mut calculation has this:
rho_*Cmu_*sqr(k_)/epsilon_

from
src/finiteVolume/cfdTools/general/bound/bound.C

Dividing by zero is avoided by bounding the values of k and epsilon.

Gauss linear for all convection terms is accurate.
Change to limitedLinear(V) 1; may help remove negative k values.

Upwind differencing gives bounded results but numerical diffusion.
Gauss linear is a second order central-difference scheme and does not assure boundedness.

limitedLinear is a blend of upwind and central difference. No: It is a limited CDS.

Consider refining the mesh in the problem region.

Other options: limitedLinear; linearUpwind; QUICK

People have had problems with backward facing steps. That is what I have.

Central differencing shows oscillation for idrama. limitedLinear(V) 1
removes it. Limiters switch between UD and CD.

*Check the mesh with, `checkMesh' to find skewed / non-orthogonal cells*
*Refine the mesh in problem regions*

*my note:  i also found cells with small determinants caused real problems in the boundary
layer.  These **really** should be avoided.  They made my simulations unstable but not immediately:
sometimes after many iterations*

Suggestions: Gradients use cellLimited Gauss linear 1;
divergence: Gauss linearUpwind cellLimited Gauss linear 1;
use linearUpwindV for div(phi,U) and other vector fields, with cellMDLimited.
Limit lapacians and surface normal gradients.

k-epsilon standard: zerogradient on inlet outlet, pressure zero.

fvSchemes requiring fixing:---------------------------

ddtSchemes{default steadyState;}

gradSchemes{default cellLimited Gauss linear 1;
grad(p) cellLimited Gauss linear 1; grad(U) cellLimited Gauss linear 1;}

divSchemes{default none;
div(phi,U) Gauss linearUpwindV cellMDLimited Gauss linear 1;
div(phi,k) Gauss linearUpwind cellLimited Gauss linear 1;
div(phi,epsilon) Gauss linearUpwind cellLimited Gauss linear 1;
div((nuEff*dev(grad(U).T()))) Gauss linearUpwind cellLimited Gauss linear 1;//Gauss linear;}

laplacianSchemes{default none; laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;}

interpolationSchemes{default linear;interpolate(U) linear;}

snGradSchemes{default corrected;}

fluxRequired{default no;p ;}

Friday, 3 September 2010

static ip

/etc/network/interfaces

change

auto eth0
iface eth0 inet dhcp

or  auto lo
iface lo inet loopback



to

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Restart the neworking service:

sudo /etc/init.d/networking restart

Wednesday, 1 September 2010

mounting windows shares, file permissions.

sudo apt-get install smbfs

edit /etc/fstab and add,

//192.168.x.x/data /mnt/data smbfs credentials=/etc/cifspw 0 0


edit /etc/cifspw as root and add,

username = username
password = password

Change permissions so people (o)ther than those as root and in group root cannot (-) (r)ead,

sudo chmod o-r /etc/cifspw

Try to read it...... permission denied.

Mount:

sudo mount -a

There may be a desire to mount with ownership as non-root. Check the mounting usb drive post elsewhere for instructions.

It reads,

sudo mount -o uid=username /dev/sdb /media/tmp

so specify -o uid=username during mount.

mounting windows shares, file permissions.