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

printing uwall

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 14, 2015, 15:58
Default printing uwall
  #1
Member
 
Reza
Join Date: Feb 2012
Posts: 67
Rep Power: 14
gooya_kabir is on a distinguished road
Hello All,

I am working on the dynamic contact angle in two phase flow, interFoam. I want to print out the
Code:
uwall
during the solving, which is one of variables in the
PHP Code:
/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle 
. I don't know where and how should I do this?

Thank you very much and looking forward to hear from you
gooya_kabir is offline   Reply With Quote

Old   November 18, 2015, 05:28
Default
  #2
Member
 
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 11
Nicole is on a distinguished road
Hi Reza,

What is uwall? Is it a field like volVectorField, volScalarField, or a single value such as a scalar or dimensionedScalar?

Sorry, I am not familiar with this solver or what uwall is.
Nicole is offline   Reply With Quote

Old   November 18, 2015, 05:43
Default
  #3
Member
 
Reza
Join Date: Feb 2012
Posts: 67
Rep Power: 14
gooya_kabir is on a distinguished road
Hi Nicole,

It is a scalar field and it is sort of velocity of closest cell to the wall. but I don't know how to print it out.

Thanks
gooya_kabir is offline   Reply With Quote

Old   November 18, 2015, 06:45
Default
  #4
Member
 
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 11
Nicole is on a distinguished road
Hi Reza,

I just used grep to search for uwall inside the solver code and it is not there. Where is this velocity calculated?

Can you not use paraview to visualise it?
Nicole is offline   Reply With Quote

Old   November 18, 2015, 18:42
Default
  #5
New Member
 
Matej Muller
Join Date: Oct 2011
Location: Slovenia
Posts: 25
Rep Power: 14
matejmuller is on a distinguished road
Hi!

Have you tried the wallGradU utility? I think it gives the near wall U values. Otherwise, you can use the R utility and use this thread to calculate u+ (If you're looking for the u+ values, this is u+=U/U_tau) http://www.cfd-online.com/Forums/mai...ar-stress.html

Hope this helped, matej
matejmuller is offline   Reply With Quote

Old   December 11, 2015, 13:54
Default
  #6
Member
 
Reza
Join Date: Feb 2012
Posts: 67
Rep Power: 14
gooya_kabir is on a distinguished road
Quote:
Originally Posted by Nicole View Post
Hi Reza,

I just used grep to search for uwall inside the solver code and it is not there. Where is this velocity calculated?

Can you not use paraview to visualise it?
Dear Nicole,

As it is here:
PHP Code:
/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle 
the problem is how to print values which are in \src.

thanks
gooya_kabir is offline   Reply With Quote

Old   December 11, 2015, 13:58
Default
  #7
Member
 
Reza
Join Date: Feb 2012
Posts: 67
Rep Power: 14
gooya_kabir is on a distinguished road
Quote:
Originally Posted by matejmuller View Post
Hi!

Have you tried the wallGradU utility? I think it gives the near wall U values. Otherwise, you can use the R utility and use this thread to calculate u+ (If you're looking for the u+ values, this is u+=U/U_tau) http://www.cfd-online.com/Forums/mai...ar-stress.html

Hope this helped, matej
Thank you matej,

I will try to see how can I get it with GradU, because it is not exactly the GradU close to the surface, actually it is: inner product of normal to wall and Uwall.

Thanks
gooya_kabir is offline   Reply With Quote

Old   December 11, 2015, 14:02
Default
  #8
Member
 
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 11
Nicole is on a distinguished road
Hi Reza,

This is probably an awful hack.... but what I would try is to declare uwall in createFields and see if this brings it into the scope of the solver. If that fails you could try also copy that file you shared into your solver so that you include it from there directly which might make the variable available to you.

But this is definitely an awful hack way of doing it, hopefully someone who knows c++ better can tell me what an awful idea this is and give you some better help
Nicole is offline   Reply With Quote

Old   December 13, 2015, 13:31
Default
  #9
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 15
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Well by taking a look at the code, uWall is used in member function which calculates theta:

Code:
Foam::tmp<Foam::scalarField>
Foam::dynamicAlphaContactAngleFvPatchScalarField::theta
(
    const fvPatchVectorField& Up,
    const fvsPatchVectorField& nHat
) const
{
    if (uTheta_ < SMALL)
    {
        return tmp<scalarField>(new scalarField(size(), theta0_));
    }

    const vectorField nf(patch().nf());

    // Calculated the component of the velocity parallel to the wall
    vectorField Uwall(Up.patchInternalField() - Up);
    Uwall -= (nf & Uwall)*nf;

    // Find the direction of the interface parallel to the wall
    vectorField nWall(nHat - (nf & nHat)*nf);

    // Normalise nWall
    nWall /= (mag(nWall) + SMALL);

    // Calculate Uwall resolved normal to the interface parallel to
    // the interface
    scalarField uwall(nWall & Uwall);

    return theta0_ + (thetaA_ - thetaR_)*tanh(uwall/uTheta_);
}
I think the best solution would be to make a new similar member function, but this time only to calculate uWall. Maybe something like:
Code:
Foam::tmp<Foam::scalarField>
Foam::dynamicAlphaContactAngleFvPatchScalarField::uWall
(
    const fvPatchVectorField& Up,
    const fvsPatchVectorField& nHat
) const
{
    const vectorField nf(patch().nf());

    // Calculated the component of the velocity parallel to the wall
    vectorField Uwall(Up.patchInternalField() - Up);
    Uwall -= (nf & Uwall)*nf;

    // Find the direction of the interface parallel to the wall
    vectorField nWall(nHat - (nf & nHat)*nf);

    // Normalise nWall
    nWall /= (mag(nWall) + SMALL);

    // Calculate Uwall resolved normal to the interface parallel to
    // the interface
    return nWall & Uwall;
}
Then you may write down the values to the disk, either by solver or a simple swak function object.

Best.
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a 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
3D printing sarahtuvia STAR-CCM+ 0 July 1, 2014 21:24
Printing Chart Aloise CFX 1 November 15, 2006 06:51
Looking for a commerical software to model screen printing (rheology) Donghun Lee CFX 1 September 22, 2000 03:00
Printing from GAMBIT Hakeem FLUENT 3 July 25, 2000 14:43
Looking for a commerical software to model screen printing (rheology) Donghun Lee FLUENT 1 July 12, 2000 16:25


All times are GMT -4. The time now is 10:41.