|
[Sponsors] |
October 18, 2019, 08:37 |
Urgent (CodedFixedValue)
|
#1 |
New Member
Join Date: Oct 2019
Posts: 13
Rep Power: 7 |
Hii all,
I m very new to OF. I m using OpenFoam-5. I m trying to run interFoam solver for flow around ship with water & air. When i run the solver i get the following error- Cannot find patchField entry for outlet file: C:/PROGRA~1/BLUECF~1/ofuser-of5/run/DTCHull-newBC/0/U.boundaryField from line 11 to line 77. It says it cannot find patchField entry for outlet for velocity file "U". I have given codedfixedvalue for inlet & zeroGradient for outlet as can be seen in below code. [U] #include "include/initialConditions" dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { //- Set patchGroups for constraint patches #includeEtc "caseDicts/setConstraintTypes" outlet { type zeroGradient; } inlet { type codedFixedValue; value uniform (0 0 0); redirectType velocityLowerInlet; code #{ const fvPatch& boundaryPatch = patch(); const vectorField& Cf = boundaryPatch.Cf(); vectorField& field = *this; scalar miny = -25; scalar maxy = 5; scalar minz = -20; scalar maxz = 5; forAll(Cf, faceI) { if ( (Cf[faceI].y() > miny) && (Cf[faceI].y() < maxy) && (Cf[faceI].z() > minz) && (Cf[faceI].z() < maxz) ) { field[faceI] = vector (1, 0, 0); } } #} } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } hull { type noSlip; } //movingWallVelocity; // value //uniform (0 0 0); } I get the same error after i run setFields also. Below is my setField code- defaultFieldValues ( volScalarFieldValue alpha.water 0 volVectorFieldValue U (0 0 0) ); regions ( // Set cell values // (does zerogradient on boundaries) boxToCell { box (-26 -19 -16) (16 0 4); fieldValues ( volScalarFieldValue alpha.water 1 volVectorFieldValue U (-1.668 0 0) ); } // Set patch values (using ==) boxToFace { box (-26 -19 -16) (16 0 4); fieldValues ( volScalarFieldValue alpha.water 1 volVectorFieldValue U (-1.668 0 0) ); } ); Can anyone tell me how to solve this?? or if anything is missing from my files. Thanks in advance Last edited by cyberpr123; October 18, 2019 at 09:22. Reason: adding version of OF |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
including parameter file in codedFixedValue | Loekatoni | OpenFOAM Running, Solving & CFD | 4 | November 9, 2023 17:56 |
codedFixedValue: accessing other patch causes crash in parallel | RL-S | OpenFOAM Running, Solving & CFD | 2 | December 24, 2019 22:20 |
Using codedFixedvalue to apply totalPressure Boundary Condition | cdm | OpenFOAM Running, Solving & CFD | 2 | June 22, 2013 15:10 |
Urgent - Polyflow - particle tracking visualization -Urgent | shafaatht | ANSYS | 0 | October 13, 2010 05:56 |
tmerge urgent urgent | jessica | FLUENT | 4 | July 15, 2006 14:37 |