Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculating Distance #106

Open
Z-K-L opened this issue Oct 13, 2023 · 7 comments
Open

Calculating Distance #106

Z-K-L opened this issue Oct 13, 2023 · 7 comments

Comments

@Z-K-L
Copy link

Z-K-L commented Oct 13, 2023

Why magrobs_[iObs][iSurf][i] = mag(robs_[iObs][iSurf][i]) is not used, instead caculated the |r| = (-U_0*x/c_0+R)/(1-(U_0/c_0)^2).

@mkraposhin
Copy link
Contributor

Hi, could you please point to the line of source code that confuses you?

@Z-K-L
Copy link
Author

Z-K-L commented Dec 1, 2023

at fwhFormulation.C line 236~237

@mkraposhin
Copy link
Contributor

Thank you for the question, I think we should ask latest contributors.
@eacfd @unicfdlab could you please comment this question?

@unicfdlab
Copy link
Owner

unicfdlab commented Dec 6, 2023

The distance is calculated using the GT formulation. If you use Farassat Formulation (U0 is equal 0) the distance will be equal to
mag(robs_[iObs][iSurf][I]).
magrobs_[iObs][iSurf][i] = (-(mag(fwh_.U0_)/fwh_.c0_) * r[0] + R_)/(1 - sqr(mag(fwh_.U0_)/fwh_.c0_));
if U0=0 then
magrobs_[iObs][iSurf][i] = (0 +R_)/(1-0)
where R_
scalar R_ = sqrt( sqr(r[0])+( 1 - sqr(mag(fwh_.U0_)/fwh_.c0_))*(sqr(r[1]) + sqr(r[2])) );
for U0 = 0
R_ = sqrt( sqr(r[0])+(sqr(r[1]) + sqr(r[2])) );

@Z-K-L
Copy link
Author

Z-K-L commented Dec 18, 2023

Thank you!

@mkraposhin
Copy link
Contributor

@unicfdlab , I'm sorry, but I cannot agree with your explanation. magrobs_ array is calculated in fwhFormulation.C, which is common both for GT formulation and Farassat Formulation. Therefore, should we move calculation of magrobs_ (and dependent variables) into different modules ?

@mkraposhin
Copy link
Contributor

@unicfdlab , I'm sorry, but I cannot agree with your explanation. magrobs_ array is calculated in fwhFormulation.C, which is common both for GT formulation and Farassat Formulation. Therefore, should we move calculation of magrobs_ (and dependent variables) into different modules ?

This question has been resolved. R_ is a weighted verison of magrobs_ . Sorry for possible panic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants