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

Read out value of keyword in boundaryField

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 6, 2013, 06:50
Default Read out value of keyword in boundaryField
  #1
Member
 
Join Date: May 2012
Posts: 55
Rep Power: 6
styleworker is on a distinguished road
Hello foamers,

I've added a new boundary condition (modified constantAlphaContactAngle) for calculating a temperature dependent contact angle. This BC writes out the current contact angle in the write function via:
Code:
os.writeKeyword("theta0") << calcMic(0) << token::END_STATEMENT << nl;
When correcting the the contact angle in interfaceProperties.C, the boundary alpha boundary conditions can be read via:
Code:
    const volScalarField::GeometricBoundaryField& abf = alpha1_.boundaryField();
    const fvBoundaryMesh& boundary = mesh.boundary();
    

    forAll(boundary, patchi)
    {
    
        if (isA<alphaContactAngleFvPatchScalarField>(abf[patchi]))
        {
            alphaContactAngleFvPatchScalarField& acap =
                const_cast<alphaContactAngleFvPatchScalarField&>
                (
                    refCast<const alphaContactAngleFvPatchScalarField>
                    (
                        abf[patchi]
                    )
                );

            fvsPatchVectorField& nHatp = nHatfv.boundaryField()[patchi];
            const scalarField theta
            (
                convertToRad*acap.theta(U_.boundaryField()[patchi], nHatp)
            );
            Info << "######## acap ======" << acap << endl;
         }
      }
The function alphaContactAngleFvPatchScalarField acap contains the entry theta0 with the corresponding value.

My Question: How can I get access to the value of the keyword theta0?

thank you!
styleworker is offline   Reply With Quote

Old   November 11, 2013, 10:44
Default
  #2
Member
 
Join Date: May 2012
Posts: 55
Rep Power: 6
styleworker is on a distinguished road
Does anybody have an idea?
styleworker is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 12 May 2, 2013 10:52
999999 (../../src/mpsystem.c@1123):mpt_read: failed:errno = 11 UDS_rambler FLUENT 2 November 22, 2011 10:46
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
GmshToFoam keyword patch0 is undefined steve999 Open Source Meshers: Gmsh, Netgen, CGNS, ... 5 September 14, 2008 14:45
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 15:37


All times are GMT -4. The time now is 06:52.