<jupyter_start><jupyter_text>print('pde defined'<jupyter_code>setup = Setting(variables=(x, nu, um, dh), # <- hier noch die neuen inputs ergänzen
                train_conditions={'pde': train_cond},
                val_conditions={},
                solution_dims={p: 1},
                n_iterations=20)
solver = PINNModule(model=SimpleFCN(variable_dims=setup.variable_dims,
                                    solution_dims=setup.solution_dims,
                                    normalization_dict=setup.normalization_dict,
                                    depth=3,
                                    width=20),
                    optimizer=torch.optim.Adam,
                    lr=1.e-2)
trainer = pl.Trainer(gpus='-1' if torch.cuda.is_available() else None,
                     num_sanity_val_steps=0,
                     benchmark=True,
                     check_val_every_n_epoch=20,
                     log_every_n_steps=1,
                     max_epochs=1,
                     logger=False,
                     checkpoint_callback=False
                     )

trainer.fit(solver, setup)
# Use LBFGS at the end
solver.lr = 1.e-2
solver.optimizer = torch.optim.LBFGS
solver.optim_params = {'max_iter': 5}
trainer = pl.Trainer(gpus='-1' if torch.cuda.is_available() else None,
                     num_sanity_val_steps=0,
                     benchmark=True,
                     check_val_every_n_epoch=20,
                     log_every_n_steps=15,
                     max_epochs=0,
                     logger=False,
                     checkpoint_callback=False
                     )

trainer.fit(solver, setup)
from torchphysics.problem.datacreator import InnerDataCreator
from datetime import datetime
datacreator = InnerDataCreator(setup.variables,
                               dataset_size=[200, 10, 10, 10], # Hier wieder die Anzahl der Punkte für die jeweilige Variable
                               sampling_strategy='grid')
data = datacreator.get_data() # Erstellen der Punkte
# Umwandeln in Tensor:
for k in data:
    data[k] = torch.tensor(data[k], device=solver.device)
# Model auswerten
time1 = datetime.now()
out = solver.model(data)
time2 = datetime.now()
time = time2 - time1
print(time)
# max und min bestimmen
max_out = torch.max(out[p]).detach().numpy()
min_out = torch.min(out[p]).detach().numpy()
from torchphysics.utils.plot import _plot
import matplotlib.pyplot as plt
solver = solver.to('cpu')
print('nu0= ',nu0,' nu1= ',nu1)
print('dh0= ',dh0, 'dh1= ', dh1, 'm')
print('um0= ', um0, 'um1= ',um1, 'm/s')
# Parameter definieren für Plot
nu = 2.0e-3 
um = 0.4
dh = 14.5e-06
print('Minimale Spalthöhe =',  h_0-dh)
if nu0<=nu and nu<=nu1 and dh0<=dh and dh<=dh1 and um0<=um and um<=um1:
    fig = _plot(model=solver.model, solution_name='p', plot_variables=[x],
                points=300, angle=[30, 30], dic_for_other_variables={'nu': nu, 'um': um, 'dh': dh})
    fig.get_axes()[0].set_ylim([min_out, max_out])
else:
    print('Ausserhalb des Trainingsbereiches')
print('Skalierungsfaktor = ', p_skal)
plt.savefig(f'p_{um}.png', dpi=300)
import xlsxwriter
#erstellen eines Workbook Objektes mit dem Dateinamen "Gleitlager_***.xlsx"
workbook = xlsxwriter.Workbook('Gleitlager.xlsx')
worksheet = workbook.add_worksheet('Tabelle_1')

worksheet.write('Ergebnistabelle Gleitlager')
worksheet.write('nu', 'dh', 'um')

workbook.close()
import winsound
frequency = 2500  # Set Frequency To 2500 Hertz
duration = 1000  # Set Duration To 1000 ms == 1 second
winsound.Beep(frequency, duration)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11728395061728394, 'fraction_numerical': 0.02665544332210999, 'mean_word_length': 2.4411196911196913, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '614191', 'license': 'Apache-2.0', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1174, 'n_words': 240, 'path': 'examples/Gleitlager/gleitlager_3D_U3.ipynb', 'repo_name': 'uwe-iben/torchphysics', 'size': '3564'}