| 29 | // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // |
| 30 | |
| 31 | void Foam::waveSuperposition::transformation |
| 32 | ( |
| 33 | const vectorField& p, |
| 34 | tensor& axes, |
| 35 | scalar& u, |
| 36 | vectorField& xyz |
| 37 | ) const |
| 38 | { |
| 39 | const uniformDimensionedVectorField& g = |
| 40 | db_.lookupObject<uniformDimensionedVectorField>("g"); |
| 41 | const scalar magG = mag(g.value()); |
| 42 | const vector gHat = g.value()/magG; |
| 43 | |
| 44 | const vector dSurf = direction_ - gHat*(gHat & direction_); |
| 45 | const scalar magDSurf = mag(dSurf); |
| 46 | const vector dSurfHat = direction_/magDSurf; |
| 47 | |
| 48 | axes = tensor(dSurfHat, - gHat ^ dSurfHat, - gHat); |
| 49 | |
| 50 | u = speed_*magDSurf; |
| 51 | |
| 52 | xyz = axes & (p - origin_); |
| 53 | } |
| 54 | |
| 55 | |
| 56 | Foam::tmp<Foam::scalarField> Foam::waveSuperposition::elevation |
no test coverage detected