## Nomogram for 5 variables

drafter
Posts: 7
Joined: Thu Sep 29, 2011 5:47 pm
Location: Germany / Bavarian / Upper Franconia

### Nomogram for 5 variables

Hello everybody,
I am a total newbie in nomography.
I successfully installed Pynomo. From now on i want to make a nomogram for a developed formula with 5 variables.
The formula is: As mentioned i do not have big experience with nomograms. I started with the literature that is available in the internet.
At the moment i have not the right point to start. In order to make an effort i found this forum.
I hope someone can help / support me by my plan. I need only the right direction to go, i hope so.
My problem is to find the right formulation for the necessary equations.

Best Regards
Markus
Leif
Posts: 56
Joined: Mon Dec 31, 2007 3:03 pm
Location: Finland
Contact:

### Re: Nomogram for 5 variables

Hello,

here is one approach. Write your equation (with new dummy variable D) as:

Q L = D (1)

D = e r1^2/(r1^2-e^2+r2^2) (2)

So you have easy part (1) and the difficult part (2). Equation (2) can be written as a determinant

Code: Select all

|(-D+e)   -D    -D*e^2||  0       1      r2^2|  = 0|  1       0      r1^2|

Depending on ranges and luck, this may turn out into a single grid (top row of the determinant, variables D and e) and two scales (variables r1 and r2).

Try playing with the two parts separately. Aligning D scale in the grid is a more tricky part. Actually if you align scale D (from Eq. 1) to a grid with variables e and D (from Eq. 2), you should use variable e as v variable of the grid and note that with 'v_start' you define the single line of the grid that aligns to the other scale. In another words in a grid one can select only a single line for alignment and pynomo uses v=v_start line as that line. Always check that aligned scales are functionally compatible, for example if one is of form x^2, the other has to be also be of form x^2, not for example linear.

So this seems to be a tricky beast, at least with this approach. However, this is not the only approach.

I hope there are no errors in my calculation, so better to double check it before using...

br,

\leif
drafter
Posts: 7
Joined: Thu Sep 29, 2011 5:47 pm
Location: Germany / Bavarian / Upper Franconia

### Re: Nomogram for 5 variables

Hello Leif,
thank you for your answer. I checked the solution but i did not get the same result. The trinomial formula has to be extended under the root with "-4 r1^2 r2^2". With that I can not solve the root in the denominator.
The main problem still is the sum under the root, i think. So i keept on going and came to the following solution for a simplification under the root:
(-e + r1 - r2) (e + r1 - r2) (-e + r1 + r2) (e + r1 + r 2)
Now i have 4 simple terms which could be separated.
I tried to to take the logarithm in order to get to a Type 3. At this point i am struggling. In the term of the logarithm are always 3 variables. Should i introduce a dummy variable ?
Perhaps you could help me again to find the right direction ? Best Regards
Markus
Leif
Posts: 56
Joined: Mon Dec 31, 2007 3:03 pm
Location: Finland
Contact:

### Re: Nomogram for 5 variables

Hello,

you are correct. I missed a sign in the expression I have to say that at the moment I do not see how this equation can be presented as a nomograph. This does not mean it is not possible.

br,

\leif
drafter
Posts: 7
Joined: Thu Sep 29, 2011 5:47 pm
Location: Germany / Bavarian / Upper Franconia

### Re: Nomogram for 5 variables

Hello,
short update.
After some problems, i decided to make a series expansion of the old formula.
For the interesting point the formula is exactly enough. The new formula is: What is the best way for the easier formula ?
If i use type 9 i would rearrange the formula to:
Q*l*r1^2-Q*l*r2^2-e*r1^2 = 0
I tried to build up the determinant for this equation. But I was not able to achieve the necessary determinant (max 2 variables per row , one variable only in one row and three ones in the last column).
After this I substituted x=Q*l and the determinant looks like the following:

Code: Select all

|  x      0        e||  0    r1^2     1|  = 0|  1    r2^2     1|

If i divide the first row by e everything should be ready for using Pynomo Type 9 ? Or ?

Best Regards
Markus
drafter
Posts: 7
Joined: Thu Sep 29, 2011 5:47 pm
Location: Germany / Bavarian / Upper Franconia

### Re: Nomogram for 5 variables

Hello,
after studying the type 9 examples i have made some progress. I have transposed the matrix in order to get r1 and r2 as grid parametres in the second row.

Code: Select all

|  x      0                1||  0    r1^2/r2^2     1|  = 0|  e       1               1|

I tried to make a nomogram with this determinant. But i did not have success.
The nomogramm should have to vertical scales and in the middle should be the r1-r2-grid, if i am right.
Is their anything else i have to consider ? Are there any recommandations for the scales ?

Attached the pynomo code:

Code: Select all

"""    ex_type9_nomo_1.pyfrom pynomo.nomographer import * N_params_1={            'u_min':0.001,            'u_max':0.02,            'f':lambda u:u,            'g':lambda u:0,            'h':lambda u:1.0,            'title':r'$u_1$',            'scale_type':'linear smart',            'tick_levels':3,            'tick_text_levels':2,            'grid':False} N_params_2={        'u_min':0.001, # for alignment        'u_max':0.002,  # for alignment        'f_grid':lambda u,v:0,        'g_grid':lambda u,v:v*v/(u*u),        'h_grid':lambda u,v:1.0,        'u_start':0.001,        'u_stop':0.002,        'v_start':0.001,        'v_stop':0.002,        'u_values':[0.001,0.002],        'v_values':[0.001,0.002],        'grid':True,        'text_prefix_u':r'$r_1$=',        'text_prefix_v':r'$r_2$=',        } N_params_3={            'u_min':0.0,            'u_max':0.01,            'f':lambda u:u,            'g':lambda u:1.0,            'h':lambda u:1.0,            'title':r'$u_3$',            'scale_type':'linear smart',            'tick_levels':3,            'tick_text_levels':2,            'grid':False            } block_params={             'block_type':'type_9',             'f1_params':N_params_1,             'f2_params':N_params_2,             'f3_params':N_params_3,             'transform_ini':False,                          } main_params={              'filename':'ex_type9_nomo_1.pdf',              'paper_height':10.0,              'paper_width':10.0,              'block_params':[block_params],              'transformations':[('rotate',0.01),('scale paper',)]              }Nomographer(main_params)

Perhaps someone has some advices !?

Best Regards
Markus
Leif
Posts: 56
Joined: Mon Dec 31, 2007 3:03 pm
Location: Finland
Contact:

### Re: Nomogram for 5 variables

Hello drafter,

sometimes one can write an equation into determinant form with grid(s) but the grids collapse and are useless.

== Proposal 1 ==
Alternative solution to your equation is to write it as

Q*l/e = r1^2/(r1^2-r2^2)

and in inverse form

e/(Ql) = 1-r2^2/r1^2

and split with dummy variables A,B

Ql = A (type 2) [f1=1/A, f2=1/Q, f3=1/l]

e/A = B (type 2) [f1=1/A, f2=1/e, f3=B]

(1-B) = r2^2/r1^2 (type 2) [f1=(1-B), f2=r2^2, f3=1/r1^2]

Hope it got correct this time . Log forms are not possible without using ladders between log(1-B) and log(B). Note that one needs to use some inverse functions in order to align the blocks correctly.

== Proposal 2==
Still alternative way to consider is to write
log(e)-log(Q)-log(l) = log(1-r2^2/r1^2) and use type 3 for the left hand side and contour type 5 for the right hand side.

br,

\leif
drafter
Posts: 7
Joined: Thu Sep 29, 2011 5:47 pm
Location: Germany / Bavarian / Upper Franconia

### Re: Nomogram for 5 variables

Hello,
I used the second proposal.
I also added a normalized formula for the variable e = epsilon*(r2-r1).
I was able to implement the contour type 5. I also tagged the type 5 wd axes with the first type 3 axes.
As I wanted to check the results i found a small problem.
For the drawed isopleth the values of Q4 should be 1. But the value is approximately 0.27.
The Fault is the first axes of type 3. But if i change from u to log(u) the value of Q4 is one, but the tagged axes do not match anymore.
What could be done to get the right result and the same axes ?

Code: Select all

from pynomo.nomographer import *const_k=1 block_1_params={   'block_type':'type_5','width':10.0,'height':10.0,#'u_title_opposite_tick':True,   'u_func':lambda u:(log(u)),   'v_func':lambda x,v:(log((v*v/x)-v)),   'u_values':[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],   'v_values':[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],'u_tick_levels':2,'u_tick_text_levels':0.5,'u_tick_side':'left',   'wd_tick_levels':3,   'wd_tick_text_levels':4,   'wd_tick_side':'right',   'wd_title':'wd = u-v',   'wd_tag':'t',      'u_title':r'$r_2$',   'v_title':r'$r_1$',   'scale_type_wd':'log',   'scale_type_u':'linear',   'wd_title_opposite_tick':True,   'wd_title_distance_center':1.5,'manual_x_scale':True,'x_min':0.1,'x_max':10.0, 'isopleth_values':[[2,2,'x']], }# this is non-obvious trick to find bottom edge coordinates of the grid in order# to align it with N nomogramblock1_dummy=Nomo_Block_Type_5(mirror_x=False)block1_dummy.define_block(block_1_params)block1_dummy.set_block()N_params_1={     'u_min':block1_dummy.grid_box.params_wd['u_min'],        'u_max':block1_dummy.grid_box.params_wd['u_max'],        #'u_min':0.1,        #'u_max':10.0,        'function':lambda u:(u),        'title':'',#r'$ttt_1$',        'tick_levels':1,        'tick_text_levels':1,     'tag':'t',                }N_params_2={        'u_min':0.01,        'u_max':0.3,        'function':lambda u:log(u),        'title':r'$epsilon_2$', 'tick_levels':3,        'tick_text_levels':2, 'scale_type':'log smart',                }N_params_3={        'u_min':0.50,        'u_max':10.0,        'function':lambda u:-log(u),        'title':r'$l_3$',       'tick_levels':3,        'tick_text_levels':2, 'scale_type':'log smart',                }N_params_4={      'reference':False,        'u_min':0.1,        'u_max':10.0,        'function':lambda u:-log(u),#-log(10),        'title':r'$Q_4$',        'tick_levels':3,        'tick_text_levels':2, 'scale_type':'log smart',                } block_2_params={             'block_type':'type_3',             'width':10.0,             'height':10.0,             'f_params':[N_params_1,N_params_2,N_params_3,                         N_params_4],             'isopleth_values':[[1,0.1,1,'x']],             }  main_params={              'filename':'Final_Contour.pdf',              'paper_height':20.0,              'paper_width':20.0,              'block_params':[block_1_params,block_2_params],              'transformations':[('rotate',0.01),('scale paper',)]              } Nomographer(main_params)

The nomogramm as pdf can be seen under:
[url]
http://drafter0815.dr.ohost.de/final_contour.pdf
[/url]

Is there anything else to consider ?

Best Regards
Markus
Leif
Posts: 56
Joined: Mon Dec 31, 2007 3:03 pm
Location: Finland
Contact:

### Re: Nomogram for 5 variables

Hello Markus,

I think you over defined the nomograph isopleths. I think the key was to have an 'x' instead of 1 in:

'isopleth_values':[['x',0.1,1.0,'x']],

Here is the nomograph code little tweaked. Some ranges need to be still adjusted. For example r1=20 is always out of range.

Code: Select all

from pynomo.nomographer import *const_k=1block_1_params={   'block_type':'type_5','width':10.0,'height':10.0,#'u_title_opposite_tick':True,   'u_func':lambda u:(log(u)),   'v_func':lambda x,v:(log((v*v/x-v))),   'u_values':[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],   'v_values':[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],    'u_tick_levels':2,    'u_tick_text_levels':0.5,    'u_tick_side':'right',   'wd_tick_levels':0,#3   'wd_tick_text_levels':0,#4   'wd_tick_side':'right',   'wd_title':'',   'wd_tag':'t',   'u_title':r'$r_2$',   'v_title':r'$r_1$',   'scale_type_wd':'linear smart',   'scale_type_u':'linear smart',   'wd_title_opposite_tick':True,   'wd_title_distance_center':1.5,'manual_x_scale':True,'x_min':0.1,'x_max':10.0,'isopleth_values':[[2.0,2.0,'x']],}N_params_1={        'u_min':0.1,        'u_max':10.0,        'function':lambda B:B,        'title':'',#r'$ttt_1$',        'tick_levels':0,#1        'tick_text_levels':0,#1        'scale_type':'linear smart',     'tag':'t',                }N_params_2={        'u_min':0.01,        'u_max':0.3,        'function':lambda eps:log(eps),        'title':r'$\epsilon_2$','tick_levels':3,        'tick_text_levels':2,'scale_type':'log smart',                }N_params_3={        'u_min':0.50,        'u_max':10.0,        'function':lambda l:-log(l),        'title':r'$l_3$',       'tick_levels':3,        'tick_text_levels':2,        'tick_side':'left','scale_type':'log smart',                }N_params_4={     'reference':False,        'u_min':0.1,        'u_max':10.0,        'function':lambda Q:-log(Q),#-log(10),        'title':r'$Q_4$',        'tick_levels':3,        'tick_text_levels':2,        'tick_side':'left','scale_type':'log smart',                }block_2_params={             'block_type':'type_3',             'width':10.0,             'height':10.0,             'f_params':[N_params_1,N_params_2,N_params_3,                         N_params_4],             'isopleth_values':[['x',0.1,1.0,'x']],             }main_params={              'filename':'Final_Contour.pdf',              'paper_height':20.0,              'paper_width':20.0,              'block_params':[block_1_params,block_2_params],              'transformations':[('rotate',90.01),('scale paper',)]              }Nomographer(main_params)

br,

\leif
drafter
Posts: 7
Joined: Thu Sep 29, 2011 5:47 pm
Location: Germany / Bavarian / Upper Franconia

### Re: Nomogram for 5 variables

Hello Leif,
i just tried out your published code. Many thanks for your support til now.
I used the values 5.0,5.0 for r2,r1. The result should be 2.5 (5^2/(5+5)). This is correct in the contour plot type 5.
If i choose for epsilon = 0.1 and for l = 1 the result of Q4 should be 0.25 (= 2.5*0.1/1).
With the new code from you i still have the problem to get not the proper result.
The result of Q4 in the nomogramm is approximately 1.2. Till now i do not know how to explain this difference.
I tried to put a type 6 nomogramm between the type 5 and type 3.
With this constellation i get the right results. But the nomogramm does not look so nice like the type 5+ type 3 nomogramm. I would prefer using the variant with only 2 blocks.
Below the code for the alternative solution:

Code: Select all

const_k=1 block_1_params={   'block_type':'type_5','width':10.0,'height':10.0,#'u_title_opposite_tick':True,   'u_func':lambda u:(log(u)),   'v_func':lambda x,v:(log((v*v/x)-v)),   'u_values':[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],   'v_values':[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],   'u_tick_levels':2,   'u_tick_text_levels':2,   'u_tick_side':'left',   'wd_tick_levels':0,   'wd_tick_text_levels':0,   'wd_tick_side':'right',   'wd_title':'',   'wd_tag':'ta',      'u_title':r'$r_2[mm] (auesserer Radius)$',   'v_title':r'$r_1[mm] (innerer Radius)$',   'scale_type_wd':'linear',   'scale_type_u':'linear',   'wd_title_opposite_tick':True,   'wd_title_distance_center':1.5,   'manual_x_scale':True,   'x_min':0.1,   'x_max':10.0,   'isopleth_values':[[5,5,'x']], }# this is non-obvious trick to find bottom edge coordinates of the grid in order# to align it with N nomogramblock1_dummy=Nomo_Block_Type_5(mirror_x=False)block1_dummy.define_block(block_1_params)block1_dummy.set_block()# LadderR_params_a={        'u_min':1.0,        'u_max':10.0,        'function':lambda u:(u),        'title':'',        'tick_levels':0,        'tick_text_levels':0,        'tick_side':'left',        'tag':'ta',   #'scale_type':'log smart',        } R_params_b={        'u_min':1.0,        'u_max':10.0,        'function':lambda u:log(u),        'title':'$R=r_1^2/(r_1+r_2) [-] (Hilfsvariable)$',        'tick_levels':4,        'tick_text_levels':2,        'tag':'tb'   #'scale_type':'log smart',        } block_2_params={              'block_type':'type_6',              'f1_params':R_params_a,              'f2_params':R_params_b,              'width':2.5,              'height':10.0,              'mirror_x':False,              'isopleth_values':[[2.5,'x']]                     }# this is non-obvious trick to find bottom edge coordinates of the grid in order# to align it with N nomogramblock1_dummy=Nomo_Block_Type_5(mirror_x=False)block1_dummy.define_block(block_1_params)block1_dummy.set_block()N_params_1={     #'u_min':block1_dummy.grid_box.params_wd['u_min'],        'u_max':block1_dummy.grid_box.params_wd['u_max'],        'u_min':1,        #'u_max':10.0,        'function':lambda u:log(u)*const_k,        'title':'',#r'$ttt_1$',        'tick_levels':1,        'tick_text_levels':1,     'tag':'tb',   'scale_type':'log smart',   #'reference':True,                }N_params_2={        'u_min':0.01,        'u_max':0.3,        'function':lambda u:log(u)*const_k,        'title':r'$\epsilon [-] (normierte Exzentrizitaet)$', 'tick_levels':3,        'tick_text_levels':2, 'scale_type':'log smart',                }N_params_3={        'u_min':0.50,        'u_max':10.0,        'function':lambda u:-log(u)*const_k,        'title':r'$l [mm] (Laenge des radialen Uebertritts)$',       'tick_levels':3,        'tick_text_levels':2, 'scale_type':'log smart',                }N_params_4={     # 'reference':False,        'u_min':0.02,        'u_max':3.0,        'function':lambda u:-log(u)*const_k,#-log(10),        'title':r'$Q=F_e/F_z [-] (Kraftverhaeltnis)$ ',        'tick_levels':3,        'tick_text_levels':2, 'scale_type':'log smart',                } block_3_params={             'block_type':'type_3',             'width':3.5,             'height':10.0,       #'reference_padding':0.0 ,             'f_params':[N_params_1,N_params_4,N_params_2,                         N_params_3],             'isopleth_values':[[2.5,0.1,0.1,'x']],             } main_params={              'filename':'Final_Contour.pdf',              'paper_height':20.0,              'paper_width':20.0,              'block_params':[block_1_params,block_2_params,block_3_params],              'transformations':[('rotate',0.01),('scale paper',)]              } Nomographer(main_params)

I think not easy up to now. Any comments or annotations ?

Best Regards
Markus
Leif
Posts: 56
Joined: Mon Dec 31, 2007 3:03 pm
Location: Finland
Contact:

### Re: Nomogram for 5 variables

Hello,

little too many iterations with this case, but I think now it should work...

Note exp() function in

Code: Select all

'v_func':lambda x,v:(log((v*v/exp(x)-v))),

An here the code...

Code: Select all

from pynomo.nomographer import *const_k=1block_1_params={   'block_type':'type_5','width':10.0,'height':10.0,#'u_title_opposite_tick':True,   'u_func':lambda u:(log(u)),   'v_func':lambda x,v:(log((v*v/exp(x)-v))),   'u_values':[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],   #'v_values':[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],   'v_values':[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,25,30],    'u_tick_levels':2,    'u_tick_text_levels':0.5,    'u_tick_side':'left',    'u_title_opposite_tick':True,   'wd_tick_levels':0,#3   'wd_tick_text_levels':0,#4   'wd_tick_side':'right',   'wd_title':'',   'wd_tag':'t',   #'wd_func':lambda x:exp(x),   'u_title':r'$r_2$',   'v_title':r'$r_1$',   'scale_type_wd':'linear smart',   'scale_type_u':'linear smart',   'wd_title_opposite_tick':True,   'wd_title_distance_center':1.5,   'u_scale_opposite':True,'manual_x_scale':True,'x_min':0.1,'x_max':3.0,'isopleth_values':[[5.0,5.0,'x']],}# this is non-obvious trick to find bottom edge coordinates of the grid in order# to align it with N nomogram#block1_dummy=Nomo_Block_Type_5(mirror_x=False)#block1_dummy.define_block(block_1_params)#block1_dummy.set_block()N_params_1={        #'u_min':block1_dummy.grid_box.params_wd['u_min'],        #'u_max':block1_dummy.grid_box.params_wd['u_max'],        'u_min':0.1,        'u_max':3.0,        'function':lambda B:B,        'title':'',#r'$ttt_1$',        'tick_levels':0,#1        'tick_text_levels':0,#1        'scale_type':'linear smart',     'tag':'t',                }N_params_2={        'u_min':0.01,        'u_max':0.3,        'function':lambda eps:log(eps),        'title':r'$\epsilon_2$',        'tick_levels':4,        'tick_text_levels':4,'scale_type':'log smart',                }N_params_3={        'u_min':0.50,        'u_max':10.0,        'function':lambda l:-log(l),        'title':r'$l_3$',        'tick_levels':4,        'tick_text_levels':4,        'tick_side':'left','scale_type':'log smart',                }N_params_4={     'reference':False,        'u_min':0.1,        'u_max':10.0,        'function':lambda Q:-log(Q),#-log(10),        'title':r'$Q_4$',        'tick_levels':4,        'tick_text_levels':4,        'tick_side':'left','scale_type':'log smart',                }block_2_params={             'block_type':'type_3',             'width':10.0,             'height':10.0,             'f_params':[N_params_1,N_params_2,N_params_4,                         N_params_3],             'isopleth_values':[['x',0.1,'x',1.0]],             }main_params={              'filename':'Final_Contour_3.pdf',              'paper_height':20.0,              'paper_width':20.0,              'block_params':[block_1_params,block_2_params],              'transformations':[('rotate',90.01),('scale paper',)]              }Nomographer(main_params)

br,

\leif
ps. What does this equation calculate?
drafter
Posts: 7
Joined: Thu Sep 29, 2011 5:47 pm
Location: Germany / Bavarian / Upper Franconia

### Re: Nomogram for 5 variables

Helo Leif,
many thanks.
I thought on something similar. But i am not the crack for nomogramms.
Now the nomogramm looks very nice without the not necessary type 6 crutch.
I don't have further questions .
In future i will try to use nomogramms for more applications.

Best Regards
Markus
Glen
Posts: 67
Joined: Fri Jan 25, 2008 4:11 am
Location: Australia

### Re: Nomogram for 5 variables

I don't suppose this is much use to you now, but looking at this equation:

starting with the version of your equation where you had Q = er1^2/(lr1^2 - lr2^2)

let L = l (for clarity; l can look like 1)

Let R2 = r2^2 and R1 = r1^2 for ease of manipulation - just label the axes with the values of r1 and r2 at the end

Then if we multiply by L and divide by e:

QL/e = 1/(1 - R2/R1)

Invert both sides:

e /(QL) = 1 - R2/R1

let x = e/QL ; this can be done by an N chart
(or rather, a pair of them)

Let x+1 = -R2/R1; this can be done by an N chart

The two 'x' scales can be done by a single (unlabelled) reference line

So if I didn't stuff something up, that would be an alternative approach