#### Matias Saibene

##### Developing and CMakin'

Since I ran into some roadblocks in development and was encouraged to ask for help, I'm going to post questions here about problems I encounter in development. I thank you all for your responses in advance.

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter Matias Saibene
- Start date

Since I ran into some roadblocks in development and was encouraged to ask for help, I'm going to post questions here about problems I encounter in development. I thank you all for your responses in advance.

This library implements a linearized Brayton cycle thermodynamic engine process model that should deliver realistic steady cruise thrust and fuel consumption for most turbojet and turbofan engines based on engine parameters that are most likely...

www.orbiter-forum.com

I think @Urwumpe did some organizational coding improvements on this library for his B-58 project. My forte is engine thermodynamics and not so much efficient and streamlined coding.

Well, my first problem I encountered is that my XB-70 won't take off.

I have no or very limited knowledge of aerodynamics, but I want to learn and would appreciate any help.

I have tried changing the area values of the elevators and the lift coefficient shift but I can't get it to take off.

It also has a problem with the landing gear, but I'll fix that soon, it must definitely be a bug in the landing gear logic.

This is the repo: https://github.com/MatiasSaibene/XB-70_Valkyrie_for_Orbiter.git

And here is attached a compiled version to test the problem I have.

Thanks in advance.

I have no or very limited knowledge of aerodynamics, but I want to learn and would appreciate any help.

I have tried changing the area values of the elevators and the lift coefficient shift but I can't get it to take off.

It also has a problem with the landing gear, but I'll fix that soon, it must definitely be a bug in the landing gear logic.

This is the repo: https://github.com/MatiasSaibene/XB-70_Valkyrie_for_Orbiter.git

And here is attached a compiled version to test the problem I have.

Thanks in advance.

It's rather hard to determine what the problem is without knowledge of your vessel parameters and your lift coefficient definitions. It could be incorrect mass or incorrect aerodynamic properties, or both. Are you comfortable posting snippets of that code?Well, my first problem I encountered is that my XB-70 won't take off.

I have no or very limited knowledge of aerodynamics, but I want to learn and would appreciate any help.

There are some legacy drag models that are superceded by drag models in the lift coefficient definitions, which is fine but it means that you need to take any drag coefficient data based on frontal area and recast it to a modified coefficient based on wing planform area. If you used published data for XB-70 drag coefficients and applied them in the airfoil definitions it will have exceedingly high drag.

It's rather hard to determine what the problem is without knowledge of your vessel parameters and your lift coefficient definitions. It could be incorrect mass or incorrect aerodynamic properties, or both. Are you comfortable posting snippets of that code?

There are some legacy drag models that are superceded by drag models in the lift coefficient definitions, which is fine but it means that you need to take any drag coefficient data based on frontal area and recast it to a modified coefficient based on wing planform area. If you used published data for XB-70 drag coefficients and applied them in the airfoil definitions it will have exceedingly high drag.

XB-70_Valkyrie_for_Orbiter/Windows/XB70Valkyrie.h

C++:

```
//Vessel parameters
const double XB70_SIZE = 22.8; //Mean radius in meters.
const double XB70_EMPTYMASS = 93000; //Empty mass in kg.
const double XB70_FUELMASS = 149500; //Fuel mass in kg.
const double XB70_ISP = 50e4; //Fuel-specific impulse in m/s.
const double XB70_MAXMAINTH = 504e3; //Max main thrust in kN.
const double XB70_AFTERBRNTH = 768e3; //Max afterburner thrust.
const double LANDING_GEAR_OPERATING_SPEED = 0.25;
const VECTOR3 XB70_CoP = {0, 0, 0}; //Center of pressure for airfoils in m.
const VECTOR3 XB70_CS = {199.5443, 585.7, 33.2172};
const double XB70_VLIFT_C = 23.94; //Chord lenght in m.
const double XB70_VLIFT_S = 585.07; //Wing area in m^2.
const double XB70_VLIFT_A = 1.751; //Wing aspect ratio.
const double XB70_HLIFT_C = 5.01;
const double XB70_HLIFT_S = 21.74;
const double XB70_HLIFT_A = 1;
```

XB-70_Valkyrie_for_Orbiter/Windows/XB70Valkyrie.cpp

C++:

```
// 1. vertical lift component (code from DeltaGlider)
void VLiftCoeff (VESSEL *v, double aoa, double M, double Re, void *context, double *cl, double *cm, double *cd)
{
const int nabsc = 9;
static const double AOA[nabsc] = {-180*RAD,-60*RAD,-30*RAD, -2*RAD, 15*RAD,20*RAD,25*RAD,60*RAD,180*RAD};
static const double CL[nabsc] = { 0, 0, -0.4, 0, 0.7, 1, 0.8, 0, 0};
static const double CM[nabsc] = { 0, 0, 0.014, 0.0039, -0.006,-0.008,-0.010, 0, 0};
int i;
for (i = 0; i < nabsc-1 && AOA[i+1] < aoa; i++);
if (i < nabsc - 1) {
double f = (aoa - AOA[i]) / (AOA[i + 1] - AOA[i]);
*cl = CL[i] + (CL[i + 1] - CL[i]) * f; // aoa-dependent lift coefficient
*cm = CM[i] + (CM[i + 1] - CM[i]) * f; // aoa-dependent moment coefficient
}
else {
*cl = CL[nabsc - 1];
*cm = CM[nabsc - 1];
}
double saoa = sin(aoa);
double pd = 0.015 + 0.4*saoa*saoa; // profile drag
*cd = pd + oapiGetInducedDrag (*cl, 1.5, 0.7) + oapiGetWaveDrag (M, 0.75, 1.0, 1.1, 0.04);
// profile drag + (lift-)induced drag + transonic/supersonic wave (compressibility) drag
}
// 2. horizontal lift component (code from DeltaGlider)
void HLiftCoeff (VESSEL *v, double beta, double M, double Re, void *context, double *cl, double *cm, double *cd)
{
int i;
const int nabsc = 8;
static const double BETA[nabsc] = {-180*RAD,-135*RAD,-90*RAD,-45*RAD,45*RAD,90*RAD,135*RAD,180*RAD};
static const double CL[nabsc] = { 0, +0.3, 0, -0.3, +0.3, 0, -0.3, 0};
for (i = 0; i < nabsc-1 && BETA[i+1] < beta; i++);
if (i < nabsc - 1) {
*cl = CL[i] + (CL[i + 1] - CL[i]) * (beta - BETA[i]) / (BETA[i + 1] - BETA[i]);
}
else {
*cl = CL[nabsc - 1];
}
*cm = 0.0;
*cd = 0.015 + oapiGetInducedDrag (*cl, 1.5, 0.6) + oapiGetWaveDrag (M, 0.75, 1.0, 1.1, 0.04);
}
```

C++:

```
//Code from DeltaGlider
hwing = CreateAirfoil3 (LIFT_VERTICAL, _V(-0.0958, 0.0574, -11.9142), VLiftCoeff, 0, XB70_VLIFT_C, XB70_VLIFT_S, XB70_VLIFT_A);
// wing and body lift+drag components
CreateAirfoil3 (LIFT_HORIZONTAL, _V(0.0789, 1.8259, -24.2352), HLiftCoeff, 0, XB70_HLIFT_C, XB70_HLIFT_S, XB70_HLIFT_A);
// vertical stabiliser and body lift and drag components
hlaileron = CreateControlSurface3 (AIRCTRL_AILERON, 18.37, 1.7, _V(-7.6463, 0.3196, -26.8960), AIRCTRL_AXIS_XPOS, 1.0, anim_raileron);
hraileron = CreateControlSurface3 (AIRCTRL_AILERON, 18.37, 1.7, _V(7.4547, 0.3174, -26.8053), AIRCTRL_AXIS_XNEG, 1.0, anim_laileron);
canards = CreateControlSurface3(AIRCTRL_ELEVATOR, 10.16, 1.7, _V(-0.0440, 1.4532, 14.7854),AIRCTRL_AXIS_XPOS, 1.0, anim_canards);
CreateControlSurface3 (AIRCTRL_ELEVATOR, 36.74, 1.7, _V(-0.0833, 0.3068, -26.6097), AIRCTRL_AXIS_XPOS, 1.0, anim_elevator);
CreateControlSurface3
(AIRCTRL_ELEVATORTRIM, 36.74, 1.7, _V(-0.0833, 0.3068, -26.6097), AIRCTRL_AXIS_XPOS, 1.0, anim_elevatortrim);
}
```

I obtained the information from a PDF that @Urwumpe recommended to me. See page 31.

https://www.nasa.gov/centers/dryden/pdf/87774main_H-587.pdf

C++:

```
//Define main engine
th_main[0] = CreateThruster(_V(-3.6722, -0.8294, -25.5365), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP);
th_main[1] = CreateThruster(_V(-2.2222, -0.8294, -25.5401), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP);
th_main[2] = CreateThruster(_V(-0.8022, -0.8294, -25.5437), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP);
th_main[3] = CreateThruster(_V(0.6378, -0.8294, -25.5473), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP);
th_main[4] = CreateThruster(_V(2.0678, -0.8294, -25.5509), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP);
th_main[5] = CreateThruster(_V(3.5278, -0.8294, -25.5545), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP);
thg_main = CreateThrusterGroup(th_main, 6, THGROUP_MAIN);
```

C++:`//Define main engine th_main[0] = CreateThruster(_V(-3.6722, -0.8294, -25.5365), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP); th_main[1] = CreateThruster(_V(-2.2222, -0.8294, -25.5401), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP); th_main[2] = CreateThruster(_V(-0.8022, -0.8294, -25.5437), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP); th_main[3] = CreateThruster(_V(0.6378, -0.8294, -25.5473), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP); th_main[4] = CreateThruster(_V(2.0678, -0.8294, -25.5509), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP); th_main[5] = CreateThruster(_V(3.5278, -0.8294, -25.5545), _V(0, 0, 1), XB70_MAXMAINTH, JP6, XB70_ISP); thg_main = CreateThrusterGroup(th_main, 6, THGROUP_MAIN);`

C++:

```
const double XB70_EMPTYMASS = 93000; //Empty mass in kg.
const double XB70_FUELMASS = 149500; //Fuel mass in kg.
const double XB70_ISP = 50e4; //Fuel-specific impulse in m/s.
const double XB70_MAXMAINTH = 504e3; //Max main thrust in kN.
const double XB70_AFTERBRNTH = 768e3; //Max afterburner thrust.
```

It seems that you are setting the maximum total thrust for the entire XB-70 to each of the six engines. From Wikipedia, the maximum thrust per engine is 89 kN per engine, for 534 kN total for all six engines. Orbiter expects this thrust to be in Newtons per the API_Reference, so XB70_MAXMAINTH = 89e3; //thrust per engine in N should be what you enter. Similarly, afterburning thrust from Wikipedia is 120 kN per engine, 720 kN for all six engines, so XB70_AFTERBRNTH = 120e3; //afterburning thrust per engine in N should be what you enter there.

Also, your Isp value is extremely high at 500,000 m/s. More typical values for afterburning jet engines are under 20,000 m/s. This value should be the same for each engine (the Isp of each engine is equal to the Isp of all six engines, it doesn't multiply by the number of engines).

Also, your mass numbers are close but not quite the same as published values. Wiki has an empty mass for the XB-70 of 115,031 kg (vs your 93,000 kg). Wiki says 140,000 kg of fuel mass vs. your 149,500 kg, which might be just a difference in data sources.

As for aerodynamic properties, it looks like from your VLiftCoeff definition that you used the coefficients for the DeltaGlider, but you applied them in the airfoil definition to the area of the XB-70 wing without modification. The resulting drag on the XB-70 will be astronomical.

Because such a delta-wing would probably not lift and land, without flaps?

Do you reach full-thrust?

Did you hook, the Air-Surface-Mode?

Perhaps something with the airfoils?

What happen if you use my joystick module? New Default.json https://ufile.io/e587t1xe

You could set a "Button to Axis" Node between a Flap-Key and the flaps at the Airfoil module. So before lIft-off, You activate the flaps and before landing?

Sol: Neptune

./Config/Neptune.cfg

./Config/Triton.cfg

./Config/Proteus.cfg

./Config/Nereid.cfg

XB-70_Valkyrie (XB-70 20001)

Vessel::RegisterModule XB70

basename=XB70

dirname=.

Vessel::RegisterModule failed

Could not load vessel module: XB70 (code /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by Modules/./libXB70.so))

[Thread 0x7fffe27fc6c0 (LWP 127538) exited]

[Thread 0x7fffe2ffd6c0 (LWP 127537) exited]

[Thread 0x7fffe37fe6c0 (LWP 127536) exited]

[Thread 0x7fffc4bf96c0 (LWP 127546) exited]

[Thread 0x7fffc53fa6c0 (LWP 127545) exited]

[Thread 0x7fffc65fc6c0 (LWP 127543) exited]

[Thread 0x7fffc6dfd6c0 (LWP 127542) exited]

[Thread 0x7fffc75fe6c0 (LWP 127541) exited]

[Thread 0x7fffe1ffb6c0 (LWP 127539) exited]

[Thread 0x7fffe3fff6c0 (LWP 127535) exited]

[Thread 0x7fffe8ffe6c0 (LWP 127534) exited]

[Thread 0x7fffe97ff6c0 (LWP 127533) exited]

double free or corruption (fasttop)

Thread 1 "Orbiter" received signal SIGABRT, Aborted.

0x00007ffff79c90ec in ?? () from /lib/x86_64-linux-gnu/libc.so.6

(gdb) Quit

Most likely your Linux distribution does not have the latest version of glibc, I will have to take that into account when publishing my binaries.Not sure if this is related to my AMD?

How many errors in the variables I made!C++:`const double XB70_EMPTYMASS = 93000; //Empty mass in kg. const double XB70_FUELMASS = 149500; //Fuel mass in kg. const double XB70_ISP = 50e4; //Fuel-specific impulse in m/s. const double XB70_MAXMAINTH = 504e3; //Max main thrust in kN. const double XB70_AFTERBRNTH = 768e3; //Max afterburner thrust.`

It seems that you are setting the maximum total thrust for the entire XB-70 to each of the six engines. From Wikipedia, the maximum thrust per engine is 89 kN per engine, for 534 kN total for all six engines. Orbiter expects this thrust to be in Newtons per the API_Reference, so XB70_MAXMAINTH = 89e3; //thrust per engine in N should be what you enter. Similarly, afterburning thrust from Wikipedia is 120 kN per engine, 720 kN for all six engines, so XB70_AFTERBRNTH = 120e3; //afterburning thrust per engine in N should be what you enter there.

Also, your Isp value is extremely high at 500,000 m/s. More typical values for afterburning jet engines are under 20,000 m/s. This value should be the same for each engine (the Isp of each engine is equal to the Isp of all six engines, it doesn't multiply by the number of engines).

Also, your mass numbers are close but not quite the same as published values. Wiki has an empty mass for the XB-70 of 115,031 kg (vs your 93,000 kg). Wiki says 140,000 kg of fuel mass vs. your 149,500 kg, which might be just a difference in data sources.

As for aerodynamic properties, it looks like from your VLiftCoeff definition that you used the coefficients for the DeltaGlider, but you applied them in the airfoil definition to the area of the XB-70 wing without modification. The resulting drag on the XB-70 will be astronomical.

Regarding VliftCoeff what exactly should change? Excuse me but I don't realize.

It is undoubtedly a problem with airfoils. You had recommended FLZ Vortex to me but I don't understand exactly what values I should use.

Because such a delta-wing would probably not lift and land, without flaps?

Do you reach full-thrust?

Did you hook, the Air-Surface-Mode?

Perhaps something with the airfoils?

What happen if you use my joystick module? New Default.json https://ufile.io/e587t1xe

You could set a "Button to Axis" Node between a Flap-Key and the flaps at the Airfoil module. So before lIft-off, You activate the flaps and before landing?

I think with the FLZ Vortex https://flz-vortex.de/ , we should create an own threat and ask if there could be found a group of coders and aerodynamic-specialists who could build a real time simulation out of it?It is undoubtedly a problem with airfoils. You had recommended FLZ Vortex to me but I don't understand exactly what values I should use.

First you need to enter airfoil profiles and build a wing from it. Then you can start calculations with different angles. And there has to be an angle of indifference: https://en.wikipedia.org/wiki/Angle_of_incidence_(aerodynamics)

At a flying wings the wing tips have a slightly downwards angle of indifference. For normal planes you need to build a second wing for the elevator.

FLZ could really be used to build a very realistic real time flight behaviour into our mainly delta-wings. - But I am not a coder.

Computers are fast enough now.

- Joined
- Mar 21, 2008

- Messages
- 2,712

- Reaction score
- 1,407

- Points
- 128

- Location
- Saco, ME

- Website
- mwhume.space

- Preferred Pronouns
- he/him

There is some data available:

Thanks @n72.75.

There is some data available:

I have written the data from the NASA report that you shared with me but still the XB-70 does not take off. I'm sure I've done something wrong because I'm new to programming and have little knowledge of aeronautics.

I share my code of how I implemented the lift coefficient table of the page 76, maybe you can guide me.

C++:

```
void VLiftCoeff (VESSEL *v, double aoa, double M, double Re, void *context, double *cl, double *cm, double *cd)
{
const int nabsc = 7;
static const double AOA[nabsc] = { -4*RAD, -2*RAD, 0*RAD, 2*RAD, 4*RAD, 6*RAD, 8*RAD,};
static const double CL[nabsc] = { -0.14, -0.11, -0.02, 0.06, 0.13, 0.20, 0.28,};
static const double CM[nabsc] = { 0.02, 0, 0, 0, 0, 0, -0.01,};
int i;
for (i = 0; i < nabsc-1 && AOA[i+1] < aoa; i++);
if (i < nabsc - 1) {
double f = (aoa - AOA[i]) / (AOA[i + 1] - AOA[i]);
*cl = CL[i] + (CL[i + 1] - CL[i]) * f; // aoa-dependent lift coefficient
*cm = CM[i] + (CM[i + 1] - CM[i]) * f; // aoa-dependent moment coefficient
}
else {
*cl = CL[nabsc - 1];
*cm = CM[nabsc - 1];
}
double saoa = sin(aoa);
double pd = 0.015 + 0.4*saoa*saoa; // profile drag
*cd = pd + oapiGetInducedDrag (*cl, XB70_VLIFT_A, 1) + oapiGetWaveDrag (M, 0.6, 0.75, 0.8, 0.95);
// profile drag + (lift-)induced drag + transonic/supersonic wave (compressibility) drag
}
```

And I apologize in advance for my ignorance, I know this should be easy to achieve but I can't.

I also have to fix the landing gear mechanism, it's a disaster. But my priority is to get the Valkyrie off the ground.

I can't run it:

But your folder contains a:

Sorry, but I still can't run it, even after installation on GLIBC 2.37-8, the latest available for Debian.Vessel::RegisterModule failed

Could not load vessel module: XB70 (code /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by Modules/./libXB70.so))

I'm going to create a virtual machine with Debian 12 to properly compile all my add-ons.Sorry, but I still can't run it, even after installation on GLIBC 2.37-8, the latest available for Debian.

Well, just using the visual helpers, your total engine thrust is over 3 MN, it should not be more than 720 kN or 0.72 MN with afterburner.

The weight is 2.369 MN which seems about right for maximum weight.

Generally it feels like the controls are all crossed up. Trying to roll right rolls the vessel to the left, etc. I modified the scenario to start while airborne, and it is extremely unstable. I think you have some flight control surfaces set up forward of the center of gravity and it really wants to fly backwards because of it. I don't know if you are trying to implement the canards but if so they seem to be overpowering the wings and tail surfaces.

There seems to be a problem with your contact point definitions:

You also seem to have some spurious forces acting at the wheel contacts which don't seem to be doing good things.

Last edited:

- Replies
- 18

- Views
- 1K

- Replies
- 6

- Views
- 928

- Replies
- 102

- Views
- 7K