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

How to get access to interfaceBouCoeffs for a custom function?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By klausb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2017, 17:02
Default How to get access to interfaceBouCoeffs for a custom function?
  #1
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22
klausb will become famous soon enough
Hello,

is it possible to access interfaceBouCoeffs in a custom function for a custom PCG solver version at the location shown below?

I have the impression, it's protected.

Code section:

Code:
namespace Foam
{ 
    defineTypeNameAndDebug(myPCG, 0);

    lduMatrix::solver::addsymMatrixConstructorToTable<myPCG>
        addmyPCGSymMatrixConstructorToTable_;
}

// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //

Foam::myPCG::myPCG
(
    const word& fieldName,
    const lduMatrix& matrix,
    const FieldField<Field, scalar>& interfaceBouCoeffs,
    const FieldField<Field, scalar>& interfaceIntCoeffs,
    const lduInterfaceFieldPtrsList& interfaces,
    const dictionary& solverControls
)
:
    lduMatrix::solver
    (
        fieldName,
        matrix,
        interfaceBouCoeffs,
        interfaceIntCoeffs,
        interfaces,
        solverControls
    )
{}
                     
Foam::solverPerformance Foam::myPCG::solve 
(
    scalarField& psi,
    const scalarField& source,
    const direction cmpt
) const
{
    word precond_name = lduMatrix::preconditioner::getName(controlDict_);

// --- Setup class containing solver performance data
    solverPerformance solverPerf
    (
        lduMatrix::preconditioner::getName(controlDict_) + typeName,
        fieldName_
    );
          
    // How to get access to interfaceBouCoeffs_ for this custom function?
    myWork::custom_function(... interfaceBouCoeffs_); 

    return solverPerf;    
}
Klaus
klausb is offline   Reply With Quote

Old   June 9, 2022, 14:44
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Hello all,

I was just asking my how the interfaceBouCoeffs are calculated and were. I understand it is an argument to the constructor but I didn't found how they are calculated
mAlletto is offline   Reply With Quote

Old   June 12, 2022, 06:52
Default
  #3
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22
klausb will become famous soon enough
Have a look at section 4/15 of: https://www.linkedin.com/pulse/openf...menico-lahaye/


This should give you some hints but it's not the complete answer to your question.
mAlletto likes this.
klausb 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
Create a custom function object t.oliveira OpenFOAM Programming & Development 13 June 24, 2022 05:41
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50


All times are GMT -4. The time now is 19:57.