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

Creating a new OpenFOAM case

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2011, 10:55
Default
  #21
Member
 
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 16
anijdon is on a distinguished road
hello Martin;
excuse me; I did some change in the solver's code and compiled it eventually, but it seems has a main problem when running a case; It doesn't do well and gives this error:

nano.zip

I don't know what to do; would you guide me?
thanks;
anijdon is offline   Reply With Quote

Old   May 2, 2011, 11:21
Default
  #22
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi Maryam ,

just add this line to constant/transportProperties:
nu nu [0 2 -1 0 0 0 0] 1e-5; // value for kinematic viscosity

Change the value to the correct one for your main fluid.

Martin
MartinB is offline   Reply With Quote

Old   May 2, 2011, 12:26
Default
  #23
Member
 
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 16
anijdon is on a distinguished road
hello;
thank you for reply;I want it read the nu from that formula which determined in the createFields not from transportProperties; If I change it's name there would be no problem?
thanks
anijdon is offline   Reply With Quote

Old   May 2, 2011, 13:05
Default
  #24
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi,

it will not work the way you have implemented it right now.

In your createFields.H this transport model and a turbulence model (although it might be a laminar one) is defined:
Code:
    singlePhaseTransportModel laminarTransport(U, phi);
    autoPtr<incompressible::RASModel> turbulence
    (
        incompressible::RASModel::New(U, phi, laminarTransport)
    );
During the setup of these models nu is read from transportProperties. Later on in your UEqn.H the viscosity from these models is used via this line:
Code:
      + turbulence->divDevReff(U)
So your own viscosity is not used so far. You must replace the divDevReff by your own formulation, if you want to continue with your hardwired approach. You can see what has to be done by looking into OpenFOAM-xxx/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C.

The more elegant solution would be to define your own viscosity model. These are located in OpenFOAM-xxx/src/transportModels/incompressible/viscosityModels/. There are examples how to make a new one in the forum.

Martin
MartinB is offline   Reply With Quote

Old   May 2, 2011, 15:49
Default
  #25
Member
 
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 16
anijdon is on a distinguished road
hello Martin;
I am extremely thankful for your kindness but I am beginner in openFoam and not familiar to the way that you said;could you explain more and tell me what shoud I do step by step; I realy apologize to you for my asking;
thanks;
anijdon is offline   Reply With Quote

Old   May 3, 2011, 02:18
Default
  #26
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi,

in your UEqn.H change:
Code:
    tmp<fvVectorMatrix> UEqn
    (
        fvm::div(phi, U)
      // + turbulence->divDevReff(U)               // removed
      - fvm::laplacian(nuEff, U)                         // nuEff is your effective viscosity
      - fvc::div(nuEff*dev(fvc::grad(U)().T())) // nuEff is your effective viscosity
    );
In your createFields.H remove:
Code:
    // singlePhaseTransportModel laminarTransport(U, phi);

    // autoPtr<incompressible::RASModel> turbulence
    //(
    //    incompressible::RASModel::New(U, phi, laminarTransport)
    //);
In your nanoalaki.C remove:
Code:
        // turbulence->correct();
And check the line:
Code:
    volTensorField gradU = fvc::grad(U); // gradU is not used in this context
If compilation errors occur, read them very carefully and fix them, beginning from the first one.

Martin
MartinB is offline   Reply With Quote

Old   May 3, 2011, 13:26
Default
  #27
Member
 
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 16
anijdon is on a distinguished road
Hello;
thank you a lot; I hope it'll resolve in this way; This problem is just for nu and not for other properties like rho or k ; Am I right?
anijdon is offline   Reply With Quote

Reply

Tags
case creation, openfoam


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
Creating a new case from command line gregh OpenFOAM Pre-Processing 25 November 14, 2013 08:38
OpenFOAM Install problem masb OpenFOAM 3 May 25, 2009 12:32
Critical errors during OpenFoam installation in OpenSuse 11.0 amscosta OpenFOAM 5 May 1, 2009 15:06
Summer School on Numerical Modelling and OpenFOAM hjasak OpenFOAM 5 October 12, 2008 14:14
Creating new case for new user wersoe OpenFOAM Pre-Processing 0 April 20, 2008 14:03


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