CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   coupledMatrix and RegionCoupling - urgent (https://www.cfd-online.com/Forums/openfoam-programming-development/119382-coupledmatrix-regioncoupling-urgent.html)

mm.abdollahzadeh June 16, 2013 08:28

coupledMatrix and RegionCoupling - urgent
 
Dear All

I have compiled coupledmatrix and regioncoupling patches from openfoam 1.6ext in openfoam 2.1x successfully.
now Im trying t test the conjucatecavity tutorial for it. But there comes a problem

Code:


Reading/calculating face flux field phi

--> FOAM FATAL ERROR:
Unknown patch field type regionCouple

Valid patchField types are :

13
(
processor
nonuniformTransformCyclic
processorCyclic
wedge
fixedValue
empty
cyclicAMI
cyclicSlip
calculated
regionCoupling
symmetryPlane
sliced
cyclic
)

    From function fvsPatchField<Type>::New

I dont know how can I solve it.
I appreciate any idea.


Best
Mahdi

wyldckat June 16, 2013 09:16

Hi Mahdi,

Quick answer - read the subsection "3.2.6 Linking new user-defined libraries to existing applications" on the OpenFOAM User Guide: http://www.openfoam.org/docs/user/co...plications.php

Best regards,
Bruno

mm.abdollahzadeh June 16, 2013 09:24

Hi Bruno

Thanks for the link.I have compiled them as a part of openfoam library not user library. just to explain my more my problem the problem is arising from this line of fvsPatchfieldNew.C when creating phi.

Code:

  typename patchConstructorTable::iterator cstrIter =
        patchConstructorTablePtr_->find(patchFieldType);

    if (cstrIter == patchConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "fvsPatchField<Type>::New(const word&, const word&, const fvPatch&"
            ", const Field<Type>&)"
        )  << "Unknown patchField type "
            << patchFieldType << nl << nl
            << "Valid patchField types are :" << endl
            << patchConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

best
Mahdi

wyldckat June 16, 2013 09:28

Hi Mahdi,

I took a better look at the first post... shouldn't the name to be used be "regionCoupling" and not "regionCouple"?

Best regards,
Bruno

mm.abdollahzadeh June 16, 2013 09:37

Many thanks for your kind answer Bruno

Regioncouple is the name of regioncouplepolypatch and regioncouplefvpatch.
regiongcoupling is the name of fieldpatches.

regioncouple patches are based on couplefvpatch. as mentioned here by HRv for openfoam extended, http://www.cfd-online.com/Forums/openfoam-solving/57847-coupled-regions.html,
there is sth that is forcing that name of the patch and field should be the same. I checked the corresponding code in openfoam 1.6ext and openfoam 2.1x but i didnt understand where I can solve it.
just i should mention that regioncoupling in openfoam 1.6ext is working.

best
Mahdi

wyldckat June 16, 2013 11:00

Hi Mahdi,

Mmm... I've taken a look into the source code of 1.6-ext and I found that the file "src/finiteVolume/fields/fvsPatchFields/constraint/regionCouple/regionCoupleFvsPatchField.H" has the following code:
Code:

public:

    //- Runtime type information
//    TypeName(regionCoupleFvPatch::typeName_());
    TypeName("regionCoupling");

On 1.5-dev it's still the exact same thing: http://sourceforge.net/p/openfoam-ex...tchField.H#l81

So, it's no wonder that "regionCouple" doesn't show up in the list :( And this probably means that Hrv hasn't fixed this yet, at least on these versions...

Best regards,
Bruno

mm.abdollahzadeh June 16, 2013 11:04

Hi Burono,

Thanks for checking the codes. But if it is not fixed, how i can run the code in openfoam1.6ext?!

Best
Mahdi

wyldckat June 16, 2013 11:11

Hi Mahdi,

Probably there is a hack somewhere in 1.6-ext that forces the loading of the correct class?

Best regards,
Bruno

mm.abdollahzadeh June 16, 2013 13:14

Hi Bruno

I think that should be hard for me to do.
I check the patch type, there is a bool attach , if i make it false, it will pass the privious error but it will blows after the first iteration.

Best
Mahdi

wyldckat June 16, 2013 13:29

Hi Mahdi,

Have you tried changing:
Code:

TypeName("regionCoupling");
To:
Code:

TypeName("regionCouple");
in "src/finiteVolume/fields/fvsPatchFields/constraint/regionCouple/regionCoupleFvsPatchField.H", but only for your version in 2.1.x?

Best regards,
Bruno

mm.abdollahzadeh June 16, 2013 14:21

Many thanks Burono,

Yes I have did it. but I got this
Code:

Reading field p



--> FOAM FATAL IO ERROR:
inconsistent patch and patchField types for
    patch type regionCouple and patchField type zeroGradient

file: /home/mahdi/OpenFOAM/mahdi-2.1.x/applications/conjugateCavity/0/p::boundaryField::right from line 35 to line 35.

    From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
    in file /home/mahdi/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 164.

FOAM exiting

Segmentation fault

best
mahdi


All times are GMT -4. The time now is 01:46.