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/)
-   -   boundary condition for dynamic mesh (https://www.cfd-online.com/Forums/openfoam-programming-development/148309-boundary-condition-dynamic-mesh.html)

ALU February 9, 2015 05:04

boundary condition for dynamic mesh
 
Hi,

for a dynamic mesh I need a slip boundary condition in combination with a fixed value in the normal direction for the point motion. I want to modify the BC in src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip. So I copied it to my OpenFOAM user directory, renamed it to myFixedNormalSlip and did a word replacement in the files. I did not do any further changes so far. I can compile it with no errors, but for some reason I cannot use it in 0/pointMotionU ( unknown patchField type).

I think there is something missing in make/options, but I have no idea what I have to add.

ALU February 11, 2015 06:22

I got my modified fixedNormalSlip working by applying the changes directly in the files stored in /opt/openfoam231/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/ .

But I am still wondering how to do it in my own lib. Any suggestions are welcome.

wikstrom February 11, 2015 14:57

Did you make the solver aware of the new library? Add the libs entry to controlDict in the case:

libs ("path/to/your/libBC.so");

/N

ALU February 12, 2015 01:31

Yes I did.

The funny thing is, if I set any boundary in pointMotionU to something like "type banana", in the error message where the possible boundary conditions are listed there is an entry "myFixedNormalSlip". But if I then set any boundary in pointMotionU to

boundary
{
type myFixedNormalSlip;
n (1 0 0);
}

I get an error message "Unknown patchField type myFixedNormalSlip" and in the following list (which is much longer then the list before) the entry "myFixedNormalSlip" is missing.

The other thing is that it works just fine if I modify a very similar BC but for fvPatchFields "/opt/openfoam231/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip" and add it to my lib.

Maybe libs located in /opt/src/OpenFOAM need some special treatment? I tried to use the Make/options from /opt/src/OpenFOAM, but that doesn't work either.


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