SRF pointer usage
Hello!
I'm trying to modify the settlingFoam solver so that it can be used within a rotating frame of reference. I have more or less tried to copy what is done in the SRFPimpleFoam solver. However, some additional modifications are necessary also in e.g. the drift velocity definitions and in the calculation of the hydrostatic pressure. And this is where I run into problems (related to my very limited C++ experience). I tried to modify the drift velocity so that it reads: Code:
Code:
Code:
)mag(SRF->Fcentrifugal()) BR Olle :confused: |
Hello again!
Still trying to understand/solve this problem. I think the problem could be related to types being incompatible. The member function returning the centrifugal force is defined in SRFModel.C as a DimensionedField<vector, volMesh>, see below: Code:
Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> > The DimensionedField can be used as a term in the momentum equations (see e.g. UrelEqn.H in SRFPimpleFoam) but it seems not to be possible to use it in algebraic expressions used to define a volScalarField or volVectorField. If someone with deeper knowledge cold tell me how to resolve this problem I would be very grateful. BR Olle |
The DimensionedField is only defined over the internal field. A GeometricField is defined over the internal field and the boundary surfaces. It's a little like trying to add a vector and a scalar... one has three values, the other has only one... how do you want me to add them?
So you need to decide what happens on the boundary field. If nothing happens, you can define your algebraic exrpession in terms of the internal field only: Code:
// U is a volVectorField |
All times are GMT -4. The time now is 02:21. |