CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Blog Entries

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

Old

Set (Initial) Internal Fields Using #codeStream

Posted April 23, 2012 at 13:55 by Hisham (Notes for OpenFOAM!)

To set up (initial) internal fields of variables according to an expression, one can use the #codeStream feature as:
Code:
internalField  #codeStream
{
    code
    #{
        const IOdictionary& d = static_cast<const IOdictionary&>(dict);
        const fvMesh& mesh = refCast<const fvMesh>(d.db());
        scalarField fld(mesh.nCells(), 12.34);// uniform value of the field as 12.34 or just fld(mesh.nCells())
...
Hisham's Avatar
Senior Member
Posted in Uncategorized
Views 1281 Comments 1 Hisham is offline Edit Tags
Old

libOpenSMOKE - Making it work once again with OpenFOAM

Posted April 14, 2012 at 05:43 by wyldckat
Updated April 21, 2012 at 08:33 by wyldckat (updated current status)

The other day Tobi asked for my help on building http://www.cfd-online.com/Forums/ope...opensmoke.html
After looking at the code and doing some trial and error, basing myself also on Tobi's already collected information, I managed to get it built/working with OpenFOAM 1.7.x, 2.0.x and 2.1.x.

And since the original page only provided a rarball (on Linux?) of the source code, I decided to use my github account to harbor the original code along...
Super Moderator
Posted in wyldckat@github
Views 2412 Comments 0 wyldckat is offline Edit Tags
Old

codedFixedValue Boundary Condition

Posted April 11, 2012 at 16:57 by Hisham (Notes for OpenFOAM!)

This is an example of using codedFixedValue boundary condition to input expressions that are time and position dependent.

Code:
    PatchName
    {
      type               codedFixedValue; 
      value              uniform (0 0 0); //$internalField;
      redirectType    BC_Given_Name; 
      code 
	#{ 
	     fixedValueFvPatchVectorField myPatch (*this);
	     forAll(myPatch, celli)
	       {
	         myPatch[celli]
...
Hisham's Avatar
Senior Member
Posted in Uncategorized
Views 1489 Comments 0 Hisham is offline Edit Tags
Old

Running OpenFOAM in parallel with different locations for each process

Posted December 15, 2011 at 17:56 by wyldckat

The other day a fellow forum user asked me for help about a problem dealing with the specific configuration of a case for running in a cluster. The specific configuration was simple: each slave machine of the cluster has it's own independent storage address on a similar path.
Below is an edited version of the reply I sent him.


OK, first detail - In the following file you have a (sort-of) well documented "decomposeParDict":
Code:
applications/utilities/parallelProcessing/decomposePar/decomposeParDict
...
Super Moderator
Views 3995 Comments 2 wyldckat is offline Edit Tags
Old

Blog about my forks at github for the repositories OpenFOAM and ThirdParty

Posted September 17, 2011 at 05:36 by wyldckat
Updated February 2, 2013 at 06:44 by wyldckat

Note: This blog post will be edited whenever more details come to life.

A bit of an introduction:
I started my experience at github by forking the ThirdParty-2.0.x repository back in 12th of August of 2011. The objective was to create a branch named get-em which would possess modifications for a simple package manager for OpenFOAM's ThirdParty folder, to then be posted as a proposition for a feature request at OpenFOAM's bug tracker. This was not requested by any of the OpenFOAM...
Super Moderator
Views 1774 Comments 1 wyldckat is offline Edit Tags

All times are GMT -4. The time now is 23:44.