Help-How to reach the goal in my BC,what's the error?
I have to write a new boundary condition derived from the " mixed "type. The goal is to set the velocity at the boundary as follow:
The following sentences must have some error that I could not found out:
gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type waveMakerVelocity)
on patch inlet of field U in file "/home/jingjing/OpenFOAM/jingjing-1.5/run/othercases/surfacewaveBC/waveBC2/linearWave/0/U"
You are probably trying to solve for a field with a generic boundary condition.
From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 692.
about the second goal:
Can I fetch the vertical velocity on the cells next to the patch like this:
If it's not correct.What's the correct expression for the second goal?
Any help will be appreciated!!!
BTW: another possibility would be to prototype the boundary condition in groovyBC. internalField() would get you the internal values of a field
There may be other reasons
I have examined it carefully.About the link problem: after " wmake libso" , my BC became a lib like any other standard BCs in FOAM. In this situation,if the BC has no error, it will be known by the solver. I have implemented other non-standard BC well in this way.So it may be not the link problem but the error from my BC code.
BWT, in my version (1.5), the method "load the binary as a plugin (libs in controlDict)" doesn't work .I don't know why
The typeName in the case file 0/U is as the same as that in my BC code.
So I still don't know why the solver cann't know my BC.-----where is the error in my BC?
maybe for the second goal ,I can use " Uy=internalField()[patchCells[i]].y(); "But that is not the key point.
Thanks for any help!
this is my BC code
the following is my BC and a waveTank case,if you are interested in my problem,you can have a look and try .Thank you
a foolish mistake!
I'm so sorry that I make a foolish mistake-----I forgot to add the BC lib to the solver's makefile and recompile the solver. I used a non-standard BC successfully long time ago,so I forgot the correct way of linking a new BC to a solver.
I apologize for wasting your time.
|All times are GMT -4. The time now is 08:50.|