2018-08-17 14:23 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002965OpenFOAMContributionpublic2018-06-01 09:56
Assigned Towill 
PrioritynormalSeveritytrivialReproducibilityhave not tried
Product Version 
Target VersionFixed in Versiondev 
Summary0002965: suggestion for code improvement for bugfix 2956
DescriptionCould edit the bug report so Im submitting a fix here instead.
Instead of using a random number to calculate the tangential vectors in ConeNozzleInjection,
this might be a better method

    // Determine direction vectors tangential to direction
    tanVec1_ = vector(-direction_.y(), direction_.x(), 0.0);
    if (mag(tanVec1_) < SMALL)
        tanVec1_ = vector(-direction_.z(), 0.0, direction_.x());

    tanVec1_ /= mag(tanVec1_);
    tanVec2_ = direction_^tanVec1_;
TagsNo tags attached.
Attached Files




will (manager)

This has already been done, I just put the functionality quite low down so that other stuff can use it. Look at commit b989b81d. It defines a "perpendicular" method in VectorI.H which does something similar to what you are suggesting. The only difference is it switches between all three options (-z, 0, x), (0, z, -y) and (y, -x, 0), depending on which is most stable.


niklas (reporter)

Excellent :)

-Issue History
Date Modified Username Field Change
2018-06-01 09:01 niklas New Issue
2018-06-01 09:10 will Note Added: 0009681
2018-06-01 09:52 niklas Note Added: 0009682
2018-06-01 09:56 will Assigned To => will
2018-06-01 09:56 will Status new => resolved
2018-06-01 09:56 will Resolution open => fixed
2018-06-01 09:56 will Fixed in Version => dev
+Issue History