MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / transformation

Function transformation

src/waves/waveSuperposition/waveSuperposition.C:31–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
30
31void 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
56Foam::tmp<Foam::scalarField> Foam::waveSuperposition::elevation

Callers 9

SDA.CFile · 0.85
linearMotion.CFile · 0.85
multiMotion.CFile · 0.85
rotatingMotion.CFile · 0.85

Calls 2

magClass · 0.50
valueMethod · 0.45

Tested by

no test coverage detected